Skip to content

Commit d9a36e6

Browse files
author
babybug
authored
fix #97
fix#97.
1 parent f6f62d1 commit d9a36e6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

data-structures/binary-tree/binary-tree.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,16 @@ func preorder(n *node) {
4242
return
4343
}
4444
fmt.Print(n.val, " ")
45-
inorder(n.left)
46-
inorder(n.right)
45+
preorder(n.left)
46+
preorder(n.right)
4747
}
4848

4949
func postorder(n *node) {
5050
if n == nil {
5151
return
5252
}
53-
inorder(n.left)
54-
inorder(n.right)
53+
postorder(n.left)
54+
postorder(n.right)
5555
fmt.Print(n.val, " ")
5656
}
5757

0 commit comments

Comments
 (0)