Question: Let us consider a Min-Max heap with N elements. The root node is at level 0. We assume that the Min-Max heap is represented by
Let us consider a Min-Max heap with N elements. The root node is at level 0. We assume that the Min-Max heap is represented by a linear array. We also assume that there are no duplicates in the heap.
Select all that apply:
a. For any element in array position i, the element at position 4i (if any) is always smaller
b. For any element in array position i, the element at position 4i +1 (if any) is always larger
c. For any element in array position i, the element at position 4i (if any) can be larger or smaller
d. For any element in array position i, the element at position 4i +1 (if any) can be larger or smaller
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
