trees figure single rotation /*rotate binary tree node with left child for avl treesthis is single rotation for case update heightsthen set new root *void rotatewithleftchildavlnode avlnode * ->leftk ->left ->rightk ->right ->height maxheightk ->left )heightk ->right ->height maxheightk ->left ) ->height figure routine to perform single rotation figure double rotation of the tree to become two levels shallower than the other side the case-by-case analysis is similar to the imbalances that are caused by insertionbut not exactly the same for instancecase in figure which would now reflect deletion from tree (rather than an insertion into )must be augmented with the possibility that tree could be as deep as tree even soit is easy to see that the rotation rebalances this case and the symmetric case in figure thus the code for balance in figure lines and uses >