- B Use Heapsort To Put The Numbers 3 4 1 9 8 2 5 In Decreasing Order You May Use Either The Tree Or The Array Repr 1 (16.9 KiB) Viewed 43 times
(b) Use heapsort to put the numbers 3,4, 1, 9, 8, 2,5 in decreasing order. You may use either the tree or the array repr
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
(b) Use heapsort to put the numbers 3,4, 1, 9, 8, 2,5 in decreasing order. You may use either the tree or the array repr
(b) Use heapsort to put the numbers 3,4, 1, 9, 8, 2,5 in decreasing order. You may use either the tree or the array representation. (3 marks) (i) Explain/show clearly how the initial heap is established. (ii) Show the heap and the partially sorted list obtained at each stage. (6 marks)