Question: a.Insert the numbers into an initially empty AVL tree. Give the diagram of the tree that results. 2 1 4 5 9 b. Draw the
a.Insert the numbers into an initially empty AVL tree. Give the diagram of the tree that results.
2 1 4 5 9
b. Draw the tree that results from adding 3 to the tree in part a.
c. Draw the tree that results from adding 6 to the tree in part b.
d. Draw the tree that results from adding 7 to the tree in part c.
e. Draw the tree that results from *removing 4 from the tree in part d.
f. Draw the tree that results from *removing 7 from the tree in part e.
g. Draw the tree that results from *removing 9 from the tree in part f.
h. Draw the tree that results from *removing 6 from the tree in part g.
* When doing removes, always replace the deleted node with the highest value on in the left subtree.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
