Question: private void inOrder (node localRoot) { if (localRoot != null) { inOrder(localRoot.leftChild); System.out.print(localRoot.iData + ); inOrder(localRoot.rightChild); } } choose best answer: A: This method
private void inOrder (node localRoot)
{
if (localRoot != null)
{
inOrder(localRoot.leftChild);
System.out.print(localRoot.iData + " ");
inOrder(localRoot.rightChild);
}
}
choose best answer:
| A: | This method will print nodes in ascending order. |
| B: | This method will print nodes in descending order. |
| C: | This method is not properly built to perform in-order traversal of a binary tree. |
| D: | none of these |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
