GATE CS 2023 · Arrays & Matrix Representation

MCQ · 1 mark · Problem PROG-DSTR-0094

Which one of the following sequences when stored in an array at locations A[1], . . . , A[10] forms a max-heap?
  1. A
    23, 17, 10, 6, 13, 14, 1, 5, 7, 12
  2. B
    23, 17, 14, 7, 13, 10, 1, 5, 6, 12
  3. C
    23, 17, 14, 6, 13, 10, 1, 5, 7, 15
  4. D
    23, 14, 17, 1, 10, 13, 16, 12, 7, 5

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/399310/gate-cse-2023-question-2

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