Learning Outcomes
At the end of this lecture, you’ll be able to:
- Elaborate on the purpose of structural rotation.
- Describe, trace and implement structural rotations: single right, single left, double right-left, double left-right.
- Explain and trace the balancing operations of an AVL tree.
- Select the appropriate rotation type in order to rebalance an AVL tree after an insertion/removal operation is performed.
- Implement the core operations of OrderedMap efficiently with an AVL tree.
- Analyze the time/space efficiency of an AVL tree.
Lecture Plan
In this lecture, we'll cover the following lessons:
- Structural Rotation: Definition
- Single Rotation: Right
- Right Rotation: Exercise I⚡
- Right Rotation: Exercise II⚡
- Right Rotation: Exercise III⚡
- Right Rotation: Exercise IV⚡
- Single Rotation: Left
- Left Rotation: Exercise⚡
- Double Rotation: Right-Left
- Double Rotation: Left-Right
- Double Rotation: Exercise I⚡
- Double Rotation: Exercise II⚡
- Structural Rotation: Putting it all together!⚡
- Structural Rotation: Exercise⚡
- AVL Tree
Lessons marked with ⚡ contain exercise/activity.