GATE IT 2006 · Arrays & Matrix Representation

MCQ · 1 mark · Problem PROG-DSTR-0203

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
  1. A
    \(O (n)\)
  2. B
    \(O (\log n)\)
  3. C
    \(O (n \log n)\)
  4. D
    \(O (n \log \log n)\)

Solve it on GATE DA practice →More Basic Data Structures problems

Show the worked solutionOfficial GATE Answer Key: Option B.See full step-by-step discussion on GateOverflow: https://gateoverflow.in/3616/gate2006-it-72

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com