First page Back Continue Last page Graphics
Mirror cases
There are actually four cases to consider that require two rotations to fix:
The two cases involving height dominated by the left subtree as have been illustrated
- These are corrected by a left rotation followed by a right rotation.
Two more cases that are the mirror images of the two presented (height dominated by right subtree)
- Corrected by a right rotation followed by a left rotation.