Data Structures and Algorithms
Lab 11 - AVL Tree
Base on your Lab10 implementation of a binary search tree data structure, implement an AVL tree data structure.
Write a main function to test your implementation step-by-step.
Hint: implement the following methods and use them when modifying the existing insert(), delete()...
- int height(Node),
- void rotateLeft(Node),
- void rotateRight(Node),
- void balance(Node) // if the subtree is unbalanced then balance it by rotating