April 2018
Beginner to intermediate
426 pages
10h 19m
English
This case occurs when the height of a node’s left child becomes greater than the height of the right child, and the left child is either balanced and left-heavy, as demonstrated in the following diagram:

Let’s use a practical example. Consider the following diagram:

Suppose node 5 was the last one inserted in the AVL tree. This would make the tree unbalanced (node 50-Y has a height of +2), so we would need to balance it.
These are the steps we need to perform to balance the tree: