Anonymous user menu

Gate2001_1.15

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 \(\le\) n), the index of the parent is
(a) i-1
(b) \(\lfloor {i \over 2} \rfloor\)
(c) \(\lceil { i \over 2} \rceil \)
(d)  \((i + 1) \over 2\)
 

Answer

Discuss

1Comment
ALOK GUPTA @galok1001
8 Jul 2018 11:11 am
b