This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #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' => {} } } } |