Week 2 homework

As of Ruby 2.0 ruby internally uses an array for hashes with 6 or fewer elements (this is called a packed hash), so for small hash collections the speed is not slower than an array (no computation of the bin value). You don't need to know this, but thought you might find it interesting. If you want to learn more about Ruby internals you should read Ruby Under a Microscope by Pat Shaughnessy