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
- Acannot have more than 19 nodes
- Bhas exactly 19 nodesCorrect answer
- Chas exactly 17 nodes
- Dhas 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.