AVL tree and Red-black tree in Ruby