AVL tree is a self-balancing Binary Search Tree (BST) where the difference between heights of left and right subtrees cannot be more than one for all nodes. This programs include following operations on AVL Tree :
- Check if tree is empty or not
- If value is less than root value
- If value is greater than root value
- If value is already present in tree
Search is implemented using recurssion. If the serach value is equal to root node it will return the node value. If not it will search further in left and right. If the value is not found it will return value not found.
For the non recursive functions stack is used.
- Inorder
- Preorder
- Postorder
