- Discuss with your neighbor:
- What an AVL tree is (and is not)
- The main advantage(s) of using an AVL tree
- The Big-Ohs for AVL tree operations:
|
Average-case |
Worst-case |
Retrieval
|
|
|
Insertion
|
|
|
Deletion
|
|
|
Traversal
|
|
|
- Review the AVL rotations handout
- Insert the numbers 1, 2, ... 10 into an AVL tree.
Draw the tree after each insertion.
If appropriate, identify
- the imbalanced node
- what type of rotation is needed
Double check that
- after each rotation that it's a BST
- after each insertion that it's an AVL tree
- Insert the numbers 10, 9, ... 5 into an AVL tree.
Draw the tree after each insertion.
If appropriate, identify
- the imbalanced node
- what type of rotation is needed
- Insert the numbers 1, 10, 2, 9, 3, 8, 4, 7, 5, 6 into an AVL tree.
Draw the tree after each insertion.
If appropriate, identify
- the imbalanced node
- what type of rotation is needed
Last Modified: