Question: Selection problems in heap: Find the 1 0 th largest element in 1 5 0 , 8 0 , 4 0 , 3 0 ,

Selection problems in heap: Find the 10thlargest element in 150,80,40,30,10,70,110,100,20,90,60,50,120,25,140using a heap (20pts ).
a)Apply the buildHeap algorithm to build a heap. Please draw the final heap (8pts).
b)Perform deleteMin operations to insert the rest of the elements to the root one by one if the new element is larger than the element at the root. Please draw the final heap after each insertion (10pts ).
c)At the end of the input, please return the 10thlargest element (2pts).

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!