sub-tree with root has height and sub-tree with root has height insertion as with the red-black treeinsertion is somewhat complex and involves number of cases implementations of avl tree insertion may be found in many textbooksthey rely on adding an extra attributethe balance factor to each node this factor indicates whether the tree is left-heavy (the height of the left sub-tree is greater than the right sub-tree)balanced (both sub-trees are the same heightor right-heavy(the height of the right sub-tree is greater than the left sub-treeif the balance would be destroyed by an insertiona rotation is performed to correct the balance new item has been added to the left subtree of node causing its height to become greater than ' right subtree (shown in greena right-rotation is performed to correct the imbalance