Question: Illustrate the Build Max Heap Algorithm using Array notation (constructing a table) and showing the detailed explanation by making a separate column. Data Given:

Illustrate the Build Max Heap Algorithm using Array notation (constructing a table) and showing the detailed explanation by making a separate column. Data Given: (34, 15, 7, 9, 25, 100, 87, 24} Also give the total runtime. Implement the Heap Sort Algorithm, after calling the BuildMaxHeap function and then calling the HeapSort function. You have to write three different functions apart from main: (a) MaxHeapify function (b) BuildMaxHeap and (c) HeapSort From main, you call the BuildMaxHeap function first and display the array, prior to calling the HeapSort function. . Using the answers from problem 1, illustrate how you would add the following key: V = 90 Then, illustrate how will you delete the value at I = 2 (second element's value) and fix the array, so that the end result is a Max Heap.
Step by Step Solution
3.46 Rating (153 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
