Left Rotation
The right child comes up and the old node drops to its left.
AVL Tree: Right-right needs a left rotation
At 10: left height 0, right height 1, balance -1. Within one, so it stays.
Cost
- Best
- O(1)
- Average
- O(1)
- Worst
- O(1)
- Space
- O(1)
Before this
Related
Leads to
Topics that need this one first.
Taught by the same lesson
AVL Tree covers these too, in the same run.