Suppose we are implementing a binary tree as a linked structure of BinaryTreeNode objects. Write a method that will print out all of the nodes of tree via an inorder traversal. You may assume that the class has a reference to a BinaryTreeNode object called root. In addition, your method may take a reference to a BinaryTreeNode object as a parameter.
What will be an ideal response?
```
public void inorder(BinaryTreeNode root)
{
if(root.getLeftChild() != null)
inorder(root.getLeftChild());
System.out.println(root.getElement());
if(root.getRightChild() != null)
inorder(root.getRightChild());
}
```
You might also like to view...
When you ________ an external table, you connect to the table without actually importing the table's data
A) link B) embed C) join D) associate
Match each function-related term with its description
A) Placed between function arguments B) Conditions specified in a logical test C) Placed around text values used as function arguments D) Applies a logical test to see if a specific condition is true E) Compares two values and returns true or false 95) Logical function 96) Comparison operator 97) Criteria 98) Quotation marks 99) Comma