The right-right case is the inverse of the left-left case. It occurs when the height of a node’s right child becomes greater than that of the left child, and the right child is either balanced or right-heavy, as demonstrated by the following diagram:
Let’s use a practical example. Consider the following diagram:
Suppose node 90 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 will ...