Question: Call heapsort on the array of size 11 with values 0, 2, 7, 6, 8, 3, 1, 4, 7, 10, 9 a) Draw the INITIAL

Call heapsort on the array of size 11 with values 0, 2, 7, 6, 8, 3, 1, 4, 7, 10, 9

a) Draw the INITIAL TREE and redraw the tree AFTER EACH CALL TO FIXHEAP.

b) Draw the tree after the first swap, the first call to fixheap, the second swap and the second call to fixheap. The means you'll draw a total of four trees. After the first swap omit the last array value from the tree. After the second swap, omit both the second to last and last array values from the tree.

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!