6.6 Heap Sort
6.6 Heap Sort Heap sort derives order from a heap structure. It first builds a max-heap from the input array, then repeatedly extracts the maximum element and places it at the end of the array. The array itself stores the heap, so the algorithm runs in place. Problem You have an array A[0..n-1] . You want a sorting algorithm with guaranteed $O(n \log n)$ time, constant extra space, and no...