Question- Define the degree of a node in a tree as the number of its nonempty children. Thus, for a binary tree, the degree of a node is 0, 1 or 2.
- Consider a binary tree which has n leaves (degree 0 nodes).
- Develop an expression in terms of n for the number of degree 2 nodes in the tree.
(Hint: The Full Binary Tree theorem states that, in a full binary tree, the number of leaves is one more than the number of internal nodes.)
Prepare an expression in terms of n for the number of degree two nodes in the tree.