In a 3-ary tree, every internal node has exactly 3 children. The total number…
2026
In a 3-ary tree, every internal node has exactly 3 children. The total number of leaf nodes in such a tree with 6 internal nodes will be __________.
- A.
17
- B.
13
- C.
23
- D.
10
Attempted by 99 students.
Show answer & explanation
Correct answer: B
In a full k-ary tree, the relationship between leaf nodes (L) and internal nodes (I) is given by the formula: L = (k - 1) * I + 1.
Given: k = 3 (3-ary tree) and I = 6.
Substitute the values into the formula: L = (3 - 1) * 6 + 1
Calculate: L = 2 * 6 + 1 = 12 + 1 = 13.
Therefore, the total number of leaf nodes is 13.