Work from the Algorithms, Part I by Kevin Wayne, Robert Sedgewick course from Coursera, in Ruby.