> < > ( ( (cfigure an insertion that causes the avl tree to become unbalanced(athe new key is inserted(bthe balance factors showing an out-of-balance treeand (cthe subtree after node is rearranged subtree encountered that is out of balance has to be rebalanced the root node of this subtree is known as the pivot node an avl subtree is rebalanced by performing rotation around the pivot node this involves rearranging the links of the pivot nodeits childrenand possibly one of its grandchildren the actual modifications depend on which descendant' subtree of the pivot node the new key was inserted into and the balance factors there are four possible casescase this caseas illustrated in figure occurs when the balance factor of the pivot node ( is left high before the insertion and the new key is inserted into the left child (cof the pivot node to rebalance the subtreethe pivot node has to be rotated right over its left child the rotation is accomplished by changing the links such that becomes the right child of and the right child of becomes the left child of > + + key key + before after figure case right rotation of the pivot node over its left child