Question: please answer in C + + Consider a ternary heap structure. Given the BuildHeap ( ) procedure below to build a heap from an array
please answer in C Consider a ternary heap structure.
Given the BuildHeap procedure below to build a heap from an array H:
BuildHeapH :
for mathrmk floorHsize downto :
Hheapifyk
Applying the BuildHeap procedure to the tree above,
a Redraw the tree after each time the heapify method is called. every step
b Write out the final array.
c Now the array H becomes a heap. What would H become if the deletemin method is called?
d Write the code for the heapify method. please answer in C
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
