Question: Consider the tree below where the numbers indicate the keys of the items stored at each node. Assume its an AVL tree. a. ( 2
Consider the tree below where the numbers indicate the keys of the items stored at each node. Assume its an AVL tree.

a. ( 2 pts.) Insert the following keys into the tree: 15,1,10,9. Show each insertion step please including the rotations you have to perform. b. (2 pts.) Now treat the tree you have at the end of part (b) as a splay tree. Insert 7 then remove 9 . c. (2 pts.) In class, we noted that when an item is inserted into or removed from an AVL tree, the height balance property might be violated. Rotations are then used to correct this problem. Provide an example of an AVL tree where a single removeElement operation requires at least three rotations. Please demonstrate a. ( 2 pts.) Insert the following keys into the tree: 15,1,10,9. Show each insertion step please including the rotations you have to perform. b. (2 pts.) Now treat the tree you have at the end of part (b) as a splay tree. Insert 7 then remove 9 . c. (2 pts.) In class, we noted that when an item is inserted into or removed from an AVL tree, the height balance property might be violated. Rotations are then used to correct this problem. Provide an example of an AVL tree where a single removeElement operation requires at least three rotations. Please demonstrate
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
