Question: A . You are given a function Min - Heapify ( A [ 1 . . n ] , n , i ) that implements

A. You are given a function Min-Heapify (A[1..n], n,i ) that implements the Heapify algorithm to rearrange the elements of an array A[1..n] so that the left and right sub-trees of element (i) obey the minimum heap property. Using this function, implement a function to receive a maximum heap H[1..n] and convert it to a minimum heap. (10 points) B. What will be the complexity of your function in terms of the heap size ( n )?(5 points) C. Write a pseudocode for an algorithm to check whether an array H[1..n] is a minimum heap. (10 points)

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 Databases Questions!