GeeksforGeeks » Multiple Choice Questions
A gate 2010 question about trees
(3 posts)-
In a binary tree with n nodes, every node has an odd number of descendants. Every node is considered to be its own descendant. What is the number of nodes in the tree that have exactly one child?
(A) 0 (B) 1 (C) (n−1)/2 (D) n-1 -
I think it should be A) 0. If a node contains only one child, then total number of descendants would be even for that which contradicts the given tree type.
-
this is full binary tree.....................so ans should be 0
Reply
You must log in to post.