data structures and algorithms in Ruby