Practicing data structures in Ruby