Practice implementing algorithms in Ruby and Javascript