Skip to content
Mad4Study

Engineering & Science

GATE Computer Science

  • GATE CS
  • 2026–27 pattern practice
  • Data Structures
  • Heaps
  • Easy

What is the minimum number of elements in a binary heap of height h (a single node has height 0)?

Trees

Pick an option to check your answer.

A heap is a complete binary tree. Levels 00 to h−1h - 1 are full (2h−12^h - 1 nodes), and the last level needs at least one node: 2h−1+1=2h2^h - 1 + 1 = 2^h.

Why not the others

  • 2h+1−12^{h+1} - 1 is the maximum (all levels full).
  • h+1h + 1 describes a chain, which is not complete.
  • 2h−12^h - 1 has height h−1h - 1.

Report an error

GATE CS · Data Structures · Trees