Question: ( 4 5 pts ) Construct a heap for the list 7 , 8 , 1 0 , 1 3 , 1 5 , 6

(45 pts) Construct a heap for the list 7,8,10,13,15,6,20,3,17 by the bottom-up algorithm we learned in the class. Suppose that the elements are stored in an array. That is, initial values of the array, A, is filled up as follows in the beginning:
A[0]=7,A[1]=8,A[2]=10,A[3]=13,A[4]=15,A[5]=6,A[6]=20,A[7]=3,A[8]=17.
Find out the array values after you apply the heapify algorithm.
(a)A[0]=
(b)A[1]=
(c)A[2]=
(d)A[3]=
(e)A[4]=
(f)A[5]=
(g)A[6]=
(h)A[7]=
(i)A[8]=
( 4 5 pts ) Construct a heap for the list 7 , 8 ,

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!