in DS recategorized
9,532 views
0 votes
0 votes

A 5-ary tree in which every internal node has exactly 5 children. The number of left nodes in such a tree with 8 internal nodes will be:

  1. 30
  2. 33
  3. 45
  4. 125
in DS recategorized
9.5k views

1 comment

33
0
0

2 Answers

0 votes
0 votes

Option B

In a complete n-ary tree, $L = (n-1) * I + 1$   where L = No. of leaves, I = No. of Internel nodes

Here n = 5, I = 8

Therefore,  L = (5-1) * 8 + 1 = 4 * 8 + 1 = 33

 

2 Comments

question asked number of left node

not number of leaves
0
0

The question was maybe wrongly printed. 
Since Official  Answer key is 9 (i.e. ALL Correct)
Not sure though!

0
0
0 votes
0 votes
The question should ask about total no. Of leaf nodes which is 33

No. Of leaf nodes=(m-1)*I+1

                              =(5-1)*8+1

                             =33

Related questions