Skip to content

Commit 0e73239

Browse files
committed
PreOrder recursive traversal should have root node first.
1 parent 27e2158 commit 0e73239

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/chapter06trees/PreOrderRecursive.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
public class PreOrderRecursive {
1616
public void PreOrder(BinaryTreeNode root){
1717
if(root != null) {
18+
System.out.println(root.data);
1819
PreOrder(root.getLeft());
19-
System.out.println(root.data);
2020
PreOrder(root.right);
2121
}
2222
}

0 commit comments

Comments
 (0)