Skip to content

Instantly share code, notes, and snippets.

View everett1992's full-sized avatar

Caleb Everett everett1992

  • Amazon
  • Seattle WA
View GitHub Profile
#Print the contents of a 16 element array, four at a time, using just each.
puts "Challenge 1\n\n"
(1..16).each_slice(4) {|nums| p nums}
puts puts
#Let the initializer of tree accept a nested structure of hashes
#example input: {'grandpa' => {'dad' => 'child 1' => {}, 'child 2' => {} }, 'uncle' => {'child 3' => {}, 'child 4' => {} } } }