
1. Turn this tree into a max-at-top heap using the procedureoutlined in lecture, and show the heap that is produced.
2. What is the array representation of the max-at-top heap thatyou obtained in part 1?
3. Heapsort begins by turning the array to be sorted into aheap. Assume that your answer to part 2 is the result of thisprocess of turning the original array into a heap.
What will the array look like after one element is put into itsfinal position by heapsort – i.e., at the end of the firstiteration of the loop in
PayPal Gateway not configured
PayPal Gateway not configured