April 2018
Beginner to intermediate
426 pages
10h 19m
English
The right-left case is the inverse of the left-right 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 left-heavy. In this case, we can fix it by doing a right rotation on the right child, which results in the right-right case, then we fix it again by doing a left rotation on the unbalanced node, as demonstrated in the following diagram:

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

Suppose node 35 was the ...