Question: 1. Consider the following integers in an unsorted array A - [4,1,3,2,16,9,17,10,14,8,7]. Con- struct a max-heap using the two methods mentioned in the lecture notes:

 1. Consider the following integers in an unsorted array A -

1. Consider the following integers in an unsorted array A - [4,1,3,2,16,9,17,10,14,8,7]. Con- struct a max-heap using the two methods mentioned in the lecture notes: (i) iterations of Upward heapify, where n is the size of the array: for i = 1 to n-1 Upward_heapify (A, i) (ii) iterations of Downward heapify: for i = n/2-1 downto 0 Downward_heapify(A, i, n - 1)

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!