Skip to content
GATEiit

GATE CSE 2024 Session 1 Q41: First three elements after heapifying an array

Question

An array [82, 101, 90, 11, 111, 75, 33, 131, 44, 93] is heapified. Which one of the following options represents the first three elements in the heapified array?

Try it: multiple choice: exactly one correct option

Select one option
Wrong answer costs 2/3 mark in GATE.
Show answer and explanation

Answer: D (official GATE 2024 final answer key)

Concept used: Bottom-up build-heap: sift down each internal node from the last one to the root.

First step: Check each option against the heap property (a min-heap root must be 11, a max-heap root 131), then run build-max-heap.

Full step-by-step solution

Detailed working, common mistakes and linked mock tests will be available with a free GATEiit account. Log-in is coming soon.

Share this question

WhatsAppDownload image

Source: official GATE 2024 Session 1 CS question paper and final answer key, organised by IISc Bangalore. Question paper · Answer key