Tree In Order Traversal Algorithm on the SSaurel's Channel
// Left, Root, Right | |
public static <T> void inOrderTraverse(Node<T> node) { | |
if (node == null) | |
return; | |
inOrderTraverse(node.left); | |
System.out.print(node.data + " "); | |
inOrderTraverse(node.right); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment