Skip to content

Instantly share code, notes, and snippets.

View arnabkd's full-sized avatar

Arnab Datta arnabkd

View GitHub Profile
import random
def rand7():
return random.randrange(1,8)
def rand5_mod():
return rand7() % 5 + 1
def rand5_recursive():
roll = rand7()
require 'terminal-table/import'
class SubsetSumMatrix
class << self
def create_empty_for(array)
matrix = []
header = [nil] + build_header_from(array)
matrix << header
array.each_with_index do |element,i|
row = header.collect{|value| 'F'}