CSSE 230: Session Notes - Day 11
Topics
- AVL Tree removal
- Initial analysis of AVL Trees
Outline
- [15 min] Demonstration of removal of elements from
an AVL tree. By hand on the whiteboard and through this annimation
- [10 min] Group exercise: Lopsided AVL trees.
- [10 min] Group exercise: Can we have more than one rotation per insert/removal?
- [10 min] Class discussion of number of rotations.
- [5 min] When the height difference of the grandchildren is equal,
you must choose a single
rotation. This case can only happen on removal. See also Wikipedia entry
on AVL trees.
- [5 min] Break
- [25 min] Work on AVL Tree assignment.
Resources
- Video narrating the slides on removing from an AVL tree
- Video explaining the mechanics of removing from an AVL tree