In a binary heap (array representation):
Parent(i) = \(\left\lfloor \tfrac{i}{2} \right\rfloor\), Left(i) = \(2i\), Right(i) = \(2i+1\)
All three can be computed directly from the index i.
But the heap size depends on the total number of elements \((n)\), which cannot be determined from i alone.
\(\therefore\) Correct Answer: (2) Heap size
Online Test Series, Information About Examination,
Syllabus, Notification
and More.
Online Test Series, Information About Examination,
Syllabus, Notification
and More.