Created
April 9, 2019 10:16
-
-
Save ssaurel/7b3c009f0f72e38b0c77e198a04d6772 to your computer and use it in GitHub Desktop.
Tree In Order Traversal Algorithm on the SSaurel's Channel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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