Show in the following heap array the left and right children

Show in the following heap array the left and right children of 32 and 27; the left children of 14 and 40.

Solution

a ) for 32 >>> 14 is left and 20 is right

for 27 >>> 32 is left and 15 is right

b) here 14 and 20 are leaf nodes so there are no childrens for the 14 and 20.

actually heap is stored using arry and the root node is stored at array[1] and array[0] is not used.

and first level nodes are stored subsequently the root

and second level nodes also stores subsequently the first level nodes and so on...

 Show in the following heap array the left and right children of 32 and 27; the left children of 14 and 40.Solutiona ) for 32 >>> 14 is left and 20 is

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site