All mock tests are FREE till 31 December — register to save your progress
Unit 7 · Data Structures and Algorithms Paper 2 CS · December 2018

In a ternary tree, the number of internal nodes of degree 1,2 , and 3 is 4,3 , and 3 respectively. The number of leaf nodes in the ternary tree is

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: B. 10

Explanation

Leaves = 1 + Σ(d − 1)·n_d = 1 + 0 × 4 + 1 × 3 + 2 × 3 = 10.

More Data Structures and Algorithms questions