WBJECA 2025 — Computer PYQ
WBJECA | Computer | 2025A complete binary tree has 63 nodes. How many leaf nodes does it have?
Choose the correct answer:
- A.
16
- B.
32
(Correct Answer) - C.
42
- D.
48
32
Explanation
In a complete binary tree (specifically a full binary tree structure where all levels are completely filled, which is implied here to satisfy the node count of 2h−1), we use the property of total nodes n.
For a complete binary tree where every internal node has exactly two children (a full binary tree), the number of leaf nodes (L) is related to the number of internal nodes (I) by L=I+1.
Given the total number of nodes n=63:
n=L+I=63
Since L=I+1, we can substitute I=L−1:
L+(L−1)=63
2L=64
L=32
A complete binary tree with n=63 nodes corresponds to a tree of height h=6 (where n=2h−1=26−1=63), and the number of leaf nodes at the deepest level is 2h−1=25=32.
Explanation
In a complete binary tree (specifically a full binary tree structure where all levels are completely filled, which is implied here to satisfy the node count of 2h−1), we use the property of total nodes n.
For a complete binary tree where every internal node has exactly two children (a full binary tree), the number of leaf nodes (L) is related to the number of internal nodes (I) by L=I+1.
Given the total number of nodes n=63:
n=L+I=63
Since L=I+1, we can substitute I=L−1:
L+(L−1)=63
2L=64
L=32
A complete binary tree with n=63 nodes corresponds to a tree of height h=6 (where n=2h−1=26−1=63), and the number of leaf nodes at the deepest level is 2h−1=25=32.

