Question: Sorting: Let A = [23, 17, 14, 6, 13, 10, 1, 5, 7, 12]. (a) Is A a max-heap? If it is not, apply the
Sorting:
Let A = [23, 17, 14, 6, 13, 10, 1, 5, 7, 12].
(a) Is A a max-heap? If it is not, apply the procedure MAX_HEAPIFY studied in class to make it a max-heap.
(b) Apply the heap-sort algorithm studied in class to your answer from part (a).
(c)What is the output of PARTITION(A,1,8)? Show the content of array A after the execution of PARTITION (A,1,8).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
