Skip to content
Mad4Study

Engineering & Science

GATE Computer Science

  • GATE CS
  • 2023 pattern
  • Data Structures
  • Binary trees
  • Easy

What is the maximum number of nodes in a binary tree of height 33, where the height of a single-node tree is 00?

Trees

Pick an option to check your answer.

A full binary tree of height hh has 20+21+⋯+2h2^{0} + 2^{1} + \dots + 2^{h} nodes.

Nmax=2h+1−1=24−1=15N_{max} = 2^{h+1} - 1 = 2^{4} - 1 = 15

Why not the others

  • 7 is 23−12^3 - 1: it counts height from 1 (three levels) instead of 0.
  • 8 is 232^3, the number of nodes on the last level only.
  • 16 is 2h+12^{h+1} without subtracting 11.

Report an error

GATE CS · Data Structures · Trees