Data Structures :: Trees - Discussion
Home > Data Structures > Trees > MCQs Questions Discussion
20 / 194
If T points to root of a tree, what does this function do?
int MFunc(tree *T)
{
int N1,N2;
if(T == NULL)
return -1;
N1 = MFunc(T->left); N2 = MFunc(T->right);
return (N1 > N2 ? N1 : N2) + 1;.
}
int MFunc(tree *T)
{
int N1,N2;
if(T == NULL)
return -1;
N1 = MFunc(T->left); N2 = MFunc(T->right);
return (N1 > N2 ? N1 : N2) + 1;.
}
Areturn the height of the tree
Bleft most child of BST
Cright most child of BST
DIt gives a compilation error
Answer: Option (Login/Signup)
Show Explanation
Asked In ::
No Discussion on this question yet!