GATE Assistant

Past questions › Computer Science and Information Technology › GATE 2023

GATE 2023 · CS · MCQ · 1 mark · Programming and Data Structures › Heaps

GATE 2023 Computer Science and Information Technology question: Which one of the following sequences when stored in an array at locations A[1], , A[10]…

Which one of the following sequences when stored in an array at locations 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

Show answer

Official answer: B

Practise this question with exam-style marking

Discussion

No discussion yet.

Join the discussion