Posts

Showing posts with the label AVL

AVL Rotations

Image
Rotation is required only in the nodes which are imbalance, imbalance means that | height of right sub-tree - height of left sub-tree | > 1. Balancing reduce the height of tree like a tree with node n have maximum height (n-1) but after rotation it will be about log(n).

AVL Tree

 AVL tree is a self-balancing binary search tree.