Chapter 12 Binary Search Trees and AVL Trees | 12.25
(ii) Update the balance factors of nodes in the path from new subtree
root to the newly inserted node as needed by the rotation.
(iii) Reset the left and right subtrees of the corresponding nodes.
(c) Exit
10.End.
e time complexity of insertion operation into an AVL search tree is O(height)=O(log n).
12.5.3 DELETION
Deletion of an element from an AVL search tree may also cause imbalance similar to insertion, rotations are
invoked to rebalance the tree a er deletion. Major classi cation of rotations are as L and R which can be fur-
ther categorized as L0, L1, L-1 regarding L rotations and R0, R1, R-1 regarding R rotations.
Let p be the parent of the node that was deleted. ...