Question: Given the following file: 2 4 , 8 , 7 7 , 2 , 6 1 , 1 2 , 5 7 , 1 3
Given the following file:
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 ie you pop off and from the root. NOW RESTRUCTURE THE HEAP AFTER 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
