previous | start | next

Fix Unbalanced Node with rotateRight

Returning to the example AVL tree, we try to insert 525:

The rotateRight method below is called to rotate the node p to the right with its left child, 550 becoming the parent of 525 and 600:



previous | start | next