Question: What does this function do ? int FunNodes ( Node node ) 1 if ( node = = null ) return 0 ; else if
What does this function do
int FunNodes Node node
if node null
return ;
else if node left null && node.right null II
node left null && node.right null
return FunNodes node: node.left
FunNodes node: node.right ;
else
return FunNodes node: node. left
FunNodes node: node.right ;
A It counts the number of internal nodes in the tree.
B It counts the number of internal nodes with two children in the tree.
C It counts the number of internal nodes with one child in the tree.
D It counts the number of leaf nodes in the tree.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
