AVL tree and corresponding functions for 3102 hw