Ruby algorithms exercises with Rspec tests.