Question: Given the following file: 2 4 , 8 , 7 7 , 2 , 6 1 , 1 2 , 5 7 , 1 3

Given the following file:
24,8,77,2,61,12,57,13,49,18
Sort this file by hand using Heapsort and answer the following questions:
(a) Draw the initial COMPLETE tree representation of the file BEFORE the HEAP is created.
(b) Draw the initial heap.
(c) Continue with the sort for two iterations PAST the initial heap i.e., you pop off 77 and 61 from the root. NOW RESTRUCTURE THE HEAP AFTER 61 is popped what is the NEW ROOT?

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!