Data structures and algorithms practice in Ruby