Algorithms in Ruby, for Princeton University Algorithms class