Question
You will perform graphical hand executions on AVL trees. Hand-insert the following sequences into an AVL tree: Sequence 1) 1,3,4,5,6,9,7,8,2 Sequence 2) 9,7,2,8,1,3,5,4,6 Sequence 3)
You will perform graphical hand executions on AVL trees. Hand-insert the following sequences into an AVL tree:
Sequence 1) 1,3,4,5,6,9,7,8,2
Sequence 2) 9,7,2,8,1,3,5,4,6
Sequence 3) 60,35,80,55,30,25,10,75,50,15,40,95,20,45,90,85,70,65
Show all your work, including:
1) Show the tree before and after each insertion.
2) Show the tree before and after each rotation.
3) Indicate the pivot node before each insertion.
4) Indicate the balance factors before and after updating them (cross out the old bf, and write down the new bf).
5) Indicate the nodes involved in each rotation.
6) Indicate the subtrees before and after each rotation.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started