[Solved]Task Implement Heap Contiguous List Use Heapsort List Data Structure Use Array Store List Q37274631
Task: Implement a heap as a contiguous list and then useheapsort on the list.
Data Structure: Use an array to store the list.However, do not use the built-in STL functions fora heap — i.e., do not use make_heap( ),push_heap( ), pop_heap( ), or sort_heap( ).
Processing: Do the following operations:
- Fill an array with unordered integers, from theC162P10heaplist.txt file. You may assume that the inputlist has no duplicate entries.
- Convert the original list into a heap using Nyhoff’sheapify algorithm.
- Sort the heap with a heapsort.
Output: Print the list 3times
- after the initial load
- after converting to a heap
- after sorting
Theoutput may go to the screen.
C162P10heaplist.txt:
72, 85, 9, 307, 25, 506, 182, 175, 10, 64, 430, 399, 2, 71, 90, 55,471, 250, 18, 222, 49, 103, 550, 341, 273
Expert Answer
Answer to Task: Implement a heap as a contiguous list and then use heapsort on the list. Data Structure: Use an array to store the… . . .
OR

