Question: heap ( A [ 1 - - n ] , i ) if 2 i n check if the left child exist heap ( A
heap i
if check if the left child exist
heap
heap
if &
we should check if there is a right child by using nested if
swap & & heap ; else if & swap & A heap ;
for to
swap &
while
if &
swap &;jlarr;
else if
swap &;;
This is a pseudo code for the heap algorithm i need to compute it as a simple C code a working code i need the explanation of the code line by line Please use simple C functions
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
