Homework for Algorithms, Part I from Princeton on Coursera in Ruby instead of Java