Skip to content

Instantly share code, notes, and snippets.

@ssaurel
Created April 9, 2019 10:16
Show Gist options
  • Save ssaurel/7b3c009f0f72e38b0c77e198a04d6772 to your computer and use it in GitHub Desktop.
Save ssaurel/7b3c009f0f72e38b0c77e198a04d6772 to your computer and use it in GitHub Desktop.
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