some excercises in ruby data structure