Question 11 Question 2c Consider the following integer array of length 11: A-7511 38 12 2 1564 Heapsort interprets A as a binary tree. As in the lecture, we assume that the employed heap is a max-Heap, i.e., the maximum is at the root. Suppose that we run the BUILD-HEAP() operation on A. 1. How many node exchanges take place overall? 2. Indicate the values of the two nodes that were exchanged in the last exchange, giving the smaller one first:
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20.
Question 11 Question 2c Consider the following integer array of length 11: A-7511 38 12 2 1564 Heapsort interprets A as
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am