Created
November 21, 2015 03:38
-
-
Save crherlihy/a139d6d32d5bec9abed4 to your computer and use it in GitHub Desktop.
Preorder traversal
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
public static void preOrder (Node root) | |
{ | |
if(root == null) return; | |
//inOrder(root.getLeft()); | |
System.out.println(root.toString()); | |
preOrder(root.getLeft()); | |
preOrder(root.getRight()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment