If the number of leaves in a strictly binary tree is an odd number, then what…

2009

If the number of leaves in a strictly binary tree is an odd number, then what can you say with full conviction about total number of nodes in the tree ?

  1. A.

    It is an odd number.

  2. B.

    It is an even number.

  3. C.

    It cannot be equal to the number of leaves.

  4. D.

    It is always greater than twice the number of leaves.

Show answer & explanation

Correct answer: A

Concept

A strictly binary tree (a full binary tree) is one in which every node has exactly 0 or 2 children. If L is the number of leaf nodes (0 children) and I is the number of internal nodes (exactly 2 children), the identity L = I + 1 always holds for such trees, and the total node count is N = L + I.

Application

  1. From L = I + 1, we get I = L − 1.

  2. Total nodes: N = L + I = L + (L − 1) = 2L − 1.

  3. The stem gives L as odd. Substituting into N = 2L − 1: 2L is always even (2 times any integer), so N = (even number) − 1 is always odd.

  4. So whenever L is odd, N = 2L − 1 is guaranteed to be odd.

Cross-check

Take a concrete strictly binary tree with L = 3 leaves (odd). Then I = L − 1 = 2 internal nodes, so N = 5, an odd number — matching the derivation. A minimal case also checks out: a single-node tree has L = 1 leaf (odd), I = 0, N = 1, also odd.

This also rules out the other statements: since N = 2L − 1 is strictly less than 2L, N can never exceed twice the leaf count. Since N = 1 = L when L = 1, N can equal the leaf count in at least one valid strictly binary tree. And since N = 2L − 1 is always odd, N is never even.

Result

The total number of nodes in the tree is always an odd number.

Explore the full course: Coding For Placement

Loading lesson…