The maximum number of nodes in a binary tree of height h (root at h = 0) is:

2025

The maximum number of nodes in a binary tree of height h (root at h = 0) is:

  1. A.

    2^h

  2. B.

    2^h - 1

  3. C.

    2^(h+1) - 1

  4. D.

    h^2

Attempted by 85 students.

Show answer & explanation

Correct answer: C

If the root is at height 0, the maximum nodes in a binary tree of height h are 1 + 2 + 4 + ... + 2^h = 2^(h+1) - 1.

Explore the full course: Coding For Placement