Consider any array representation of an n element binary heap where the…
PYQ GATE 2001
Consider any array representation of an n element binary heap where the elements are stored from index 1 to index n of the array. For the element stored at index i of the array (i <= n), the index of the parent is
- A.
i − 1
- B.
floor(i/2)
- C.
ceiling(i/2)
- D.
(i + 1)/2
Attempted by 322 students.
Sign up free to check your answer
Sign up freeLoading lesson…

