Lecture 17
Learning objectives
After this class, you should be able to:
- Define an AVL search tree..
- Write code to implement insertion into an AVL tree, and give its time complexity.
- Given a sequence of insertions into an AVL tree, draw the tree.
Reading assignment
- Section 4.4.
- Lecture: Trees: Part 4 -- AVL trees.
- None.
Exercises and review questions
- Exercises and review questions on current lecture's material
- Insert the following elements into an AVL search tree in the order given below and draw the resulting tree:
10, 8, 4, 2, 0, 3, 7, 6, 5
.- Write code to implement a single rotation on an AVL tree for case 4 (
rotateWithRightChild
).- Questions on next lecture's material
- None.
Last modified: 6 Oct 2011