Created
July 4, 2016 06:40
-
-
Save AdelinGhanaem/130e28fd806fe275df0cbc9f471aae05 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 class InOrder { | |
| public void traverse(Node root) { | |
| if (root == null) { | |
| return; | |
| } | |
| traverse(root.getLeft()); | |
| System.out.print(root.getValue()+" > "); | |
| traverse(root.getRight()); | |
| } | |
| public static void main(String[] strings) { | |
| Node root = SimpleTreeFactory.get(); | |
| InOrder inOrder = new InOrder(); | |
| inOrder.traverse(root); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment