Question: 2) Given the initial AVL tree shown to the right, perform the following actions in sequence. (a) Label every node with its balance. (b) Draw

2) Given the initial AVL tree shown to the right, perform the following actions in sequence. (a) Label every node with its balance. (b) Draw the tree immediately after 40 is 71 80 inserted (before rebalancing), labeling each node whose balance changed 25 60 76 84 (c) Draw the tree after rebalancing, labeling each node whose balance changed. If multiple rotate steps are required, draw the tree after each rotate, labeling each node whose balance changed 12 35 78 82 89 86 96 (d) Draw the tree immediately after 82 is deleted (before rebalancing), labeling each node whose balance changed (e) Draw the tree after rebalancing, labeling every node in this tree with its balance. We did not discuss node deletion in class; however, since 82 was a leaf node, you should be able to perform this rebalancing using right and/or left rotations, based on the node balances
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
