An array X of n distinct integers is interpreted as a complete binary tree.…
GATE · 2006 · IT
An array X of n distinct integers is interpreted as a complete binary tree. The index of the first element of the array is 0. If only the root node does not satisfy the heap property, the algorithm to convert the complete binary tree into a heap has the best asymptotic time complexity of
- A.
O (n)
- B.
O (log n)
- C.
O (nlog n)
- D.
O (n log log n)
Attempted by 493 students.
Show answer
Correct answer: B
Explore the full course: Iocl Engineers Officers Grade A Paper 2
Loading lesson…