A binary tree has leaf nodes. The number of nodes of degree in is
View worked solution
Answer: B
In any binary tree, let:
- be the number of leaf nodes (nodes with degree )
- be the number of nodes with degree
- be the number of nodes with degree
The total number of nodes in the tree is:
Since a tree with nodes has exactly edges, and each edge connects a parent to its child, we can also count the edges by summing the outgoing degrees of all nodes:
Equating the two expressions for the number of edges ():
Subtracting from both sides simplifies to:
Given that the number of leaf nodes , the number of nodes of degree is:
Therefore, the correct option is B.
Free practice · Your answers on this page are not saved.
