Skip to content

Instantly share code, notes, and snippets.

@johana-star
Created March 17, 2013 21:41
Show Gist options
  • Save johana-star/5183776 to your computer and use it in GitHub Desktop.
Save johana-star/5183776 to your computer and use it in GitHub Desktop.
def create_array(number)
array = []
number.times do |num|
array << "e#{num}".to_s
end
return array
end
def find_combinations(array)
combos = []
array.length.times do |number|
next if number == 0
combos << array.combination(number)
end
return combos
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment