retagged by
23,854 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 ______.
retagged by

12 Answers

5 votes
5 votes
199 nodes with degree 2.
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 votes
1 votes
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

36 votes
36 votes
4 answers
1
go_editor asked Feb 14, 2015
9,213 views
Given that hash table $T$ with $25$ slots that stores $2000$ elements, the load factor $a$ for $T$ is _________.
27 votes
27 votes
6 answers
2
go_editor asked Feb 14, 2015
12,849 views
The result evaluating the postfix expression $10 \ 5 + 60 \ 6 / * 8 -$ is $284$$213$$142$$71$
35 votes
35 votes
12 answers
3
go_editor asked Feb 12, 2015
30,014 views
A binary tree T has $20$ leaves. The number of nodes in T having two children is ______.