GATE CS 2019 · Asymptotic Analysis & Recurrences

MCQ · 2 marks · Problem PROG-DIVC-0178

Consider the following statements:I. The smallest element in a max-heap is always at a leaf node.II. The second largest element in a max-heap is always a child of the root node.III. A max-heap can be constructed from a binary search tree in \(\Theta (n)\) time.IV. A binary search tree can be constructed from a max-heap in \(\Theta (n)\) time.Which of the above statements is/are TRUE?
  1. A
    I, II and III
  2. B
    I, II and IV
  3. C
    I, III and IV
  4. D
    II, III and IV

Solve it on GATE DA practice →More Searching & Sorting Algorithms problems

Show the worked solutionOfficial GATE Answer Key: Option A.See full step-by-step discussion on GateOverflow: https://gateoverflow.in/302808/gate2019-cs-40

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