single rotation figure shows the single rotation that fixes case the before picture is on the left and the after is on the right let us analyze carefully what is going on node violates the avl balance property because its left subtree is two levels deeper than its right subtree (the dashed lines in the middle of the diagram mark the levelsthe situation depicted is the only possible case scenario that allows to satisfy the avl property before an insertion but violate it afterwards subtree has grown to an extra levelcausing it to be exactly two levels deeper than cannot be at the same level as the new because then would have been out of balance before the insertionand cannot be at the same level as because then would be the first node on the path toward the root that was in violation of the avl balancing condition to ideally rebalance the treewe would like to move up level and down level note that this is actually more than the avl property would require to do thiswe rearrange nodes into an equivalent tree as shown in the second part of figure here is an abstract scenariovisualize the tree as being flexiblegrab the child node close your eyesand shake itletting gravity take hold the result is that will be the new root the binary search tree property tells us that in the original tree so becomes the right child of in the new tree and remain as the left child of and right child of respectively subtree ywhich holds items that are between and in the original treecan be placed as ' left child in the new tree and satisfy all the ordering requirements as result of this workwhich requires only few pointer changeswe have another binary search tree that is an avl tree this happens because moves up one levely stays at the same leveland moves down one level and not only satisfy the avl requirementsbut they also have subtrees that are exactly the same height furthermorethe new height of the entire subtree is exactly the same as the height of the original subtree prior to the insertion that caused to grow thus no further updating of heights on the path to the root is neededand consequently no further rotations are needed figure shows that after the insertion of into the original avl tree on the leftnode becomes unbalanced thuswe do single rotation between and obtaining the tree on the right as we mentioned earliercase represents symmetric case figure shows how single rotation is applied let us work through rather long example suppose we start with an initially empty avl tree and insert the items and then through in sequential order the first problem occurs when it is time to insert item because the avl figure single rotation to fix case