AVL tree in Erlang