Question: ( 3 + 3 Points ) Suppose there is a Binary Min - Heap with exactly 5 nodes, containing items with priorities 6 , 1

(3+3 Points) Suppose there is a Binary Min-Heap with exactly 5 nodes, containing items with priorities 6,10,1,8,5 a. Show every possible binary min-heap that could match this description. For each, draw the appropriate tree and the array representation. b. For one of your answers to part (a), show what happens with 4 deleteMin operations. Clearly indicate which heap you are starting with and show the heap after each deleteMin. You can just draw the tree (not the array) after each step. (4 Points Draw a valid AVL tree and give two keys to be inserted on the left subtree of this tree. The second insertion should cause a violation of the height invariant at the root, fixing this violation must require a double rotation. (5 Points) Draw all the rotations that you must perform and the final AVL tree after the following elements are inserted in the given order starting from an empty tree. 1,10,5,7,3,13,6,4,8,9 Draw all intermediate trees. All height factors must be clearly indicated at every step.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!