Question: ( 3 + 3 Points ) Suppose there is a Binary Min - Heap with exactly 5 nodes, containing items with priorities 6 , 1
Points Suppose there is a Binary MinHeap with exactly nodes, containing items with priorities a Show every possible binary minheap 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 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. 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. 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. 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
