MCQ
Q.
Select the code snippet which performs in-order traversal.
a)
public void inorder(Tree root)
{
System.out.println(root.data);
inorder(root.left);
inorder(root.right);
}
b)
public void inorder(Tree root)
{
inorder(root.left);
System.out.println(root.data);
inorder(root.right);
}
c)
public void inorder(Tree root)
{
System.out.println(root.data);
inorder(root.right);
inorder(root.left);
}
d) None of the mentioned
Correct Answer: B
None.