Question: This question is about the heap. ( 2 0 % ) a . Suppose array S = [ 1 0 , 1 2 , 1

This question is about the heap. (20%)
a. Suppose array S=[10,12,1,14,6,5,8,15,3,9,7,4,11,13,2]. Show the result of
a max-heap after heapifying the array S .
b. Suppose 20 is inserted to the result of (a). Show the result of the max-heap after
insertion.
c. Suppose the root of the max-heap in (b) is removed twice. Show the result after each
deletion.
Note: If your final answer is correct, you will obtain full scores. If your final answer
is incorrect, you can obtain partial scores from the intermediate steps.
This question is about the heap. ( 2 0 % ) a .

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!