Question: a ) Starting with the procedure MAX - HEAPIFY, write pseudocode for the procedure MIN - HEAPIFY ( A , i , n ) ,
a Starting with the procedure MAXHEAPIFY, write pseudocode for the procedure MIN
HEAPIFY A i which performs the corresponding manipulation on a minheap. How does the
running time of MINHEAPIFY compare with that of MAXHEAPIFY?
b Considering the function of BuildMaxHeap, write pseudocode for the procedure BUILD
MINHEAP.
c Comment on whether or not will there be any change in the procedure HEAPSORT keeping in
mind the modifications done in parts a and b Give valid arguments.
d Illustrate the operation of BUILDMAXHEAP and then HEAPSORT on the array A
; with root at index Show all steps with elements of array after
each operation.
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
