What is the height of a binary tree with 7 nodes ?

2025

What is the height of a binary tree with 7 nodes ?

  1. A.

    3

  2. B.

    4

  3. C.

    2

  4. D.

    7

Attempted by 132 students.

Show answer & explanation

Correct answer: C

In advanced textbooks (like CLRS), the height of a tree is defined as the number of edges on the longest downward path from the root to a leaf.

  • A single-node tree has a height of 0 (since there are no edges).

  • In a full, balanced binary tree with 7 nodes, the path from the root to any leaf node crosses exactly 2 edges.

  • Under this definition, the minimum height is 2 (Option 3).

Explore the full course: Niacl Ao It Specialist