- Discuss with your neighbor:
- What a Splay tree is (and is not)
- The main advantage(s) of using a Splay tree?
- The Big-Ohs for Splay trees operations:
|
Average-case |
Worst-case |
Retrieval
|
|
|
Insertion
|
|
|
Deletion
|
|
|
Traversal
|
|
|
- Review the splaying handout
- Insert the numbers 1, 2, ... 5 into a Splay tree.
Draw the tree after each insertion.
Draw the tree after each Zig, Zig-zag and Zig-zig rotation.
(Note: If it's helpful, identify which node is k1, k2, ...)
(Note: Double check that after each rotation that it's still a BST.)
- Insert the numbers 1, 5, 2, 6, 3, 7, 4, 8 into a Splay tree.
Draw the tree after each insertion.
Draw the tree after each Zig, Zig-zag and Zig-zig rotation.
Last Modified: