Skip to content

ISRO Scientist/Engineer CSE 2017Data Structures › Binary Trees and Binary Search Trees

ISRO Scientist/Engineer CSE 2017 PYQ: A strictly binary tree with 10 leaves

A strictly binary tree with 10 leaves

  1. A
    cannot have more than 19 nodes
  2. B
    has exactly 19 nodes
    Correct answer
  3. C
    has exactly 17 nodes
  4. D
    has exactly 20 nodes

Answer

(B) has exactly $19$ nodes

Approach

Use the structural property of a strictly binary tree (every internal node has exactly two children). Let $L$ be the number of leaves and $I$ the number of internal nodes. In such a tree, $L = I + 1$, so the total number of nodes is $N = L + I = 2L - 1$. Substituting $L = 10$ gives $N = 19$.

Reviewed by ISRO IQ Editorial Team.