Question: What is the logical error in the findFun method? int findFun ( Node node ) { if ( node . key = = null )
What is the logical error in the findFun method?
int findFun Node node
if nodekey null
return ;
else
int length ;
length findFun node: node.left;
length findFun node: node.right;
return length;
A The method counts all nodes instead of finding the maximum.
B The method doesn't count the root node when finding the maximum.
C The method doesn't count the leaf nodes when finding the maximum.
D The method returns instead of for empty 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
