in DS retagged by
23,937 views
42 votes
42 votes
Consider a binary tree T that has $200$ leaf nodes. Then the number of nodes in T that have exactly two children are ______.
in DS retagged by
23.9k views

1 comment

2
2

12 Answers

5 votes
5 votes
199 nodes with degree 2.
by

2 Comments

edited by
ok
1
1
edited by
answer is 199
0
0
4 votes
4 votes
Answer is: 199

Because, In Binary Tree, number of leaf nodes is always one more than nodes with two children.

L=T+1

where, L=Number of leaf nodes

          T=Number of internal nodes with two childrens
2 votes
2 votes
Using formula for Binary Tree having N Leaf nodes there is N-1 Nodes will have two children..

So here answer will be 199.
1 vote
1 vote
we know the formula that \

no of leaf nodes= internal_nodes(degree_of_tree - 1)+1

so here given leaf nodes=200 and we know because of 2 children(mentioned in the question) degree is 2

so on putting these value we will get answer 199

200=internal_nodes(2 - 1)+1

so internal nodes=199.
Answer:

Related questions