1. [60 points] Heap-Sort
(1) [40] Illustrate the operations of building a Max-Heap and Heap-Sort on the following
array: A=<16, 20, 10, 5, 13, 8, 7, 4, 25, 3, 6, 12>. For each iteration, use binary trees to
show the intermediate data structures or results.
(2) [20] What are its worst-case and best-case running times? Justify your answer