Classic Algorithms in Ruby