Skip to content

Commit

Permalink
fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
hunterhug authored Feb 17, 2021
1 parent 2ed6b32 commit b62c4a0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions algorithm/tree.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ func PostOrder(tree *TreeNode) {
}

// 先打印左子树
MidOrder(tree.Left)
PostOrder(tree.Left)
// 再打印右字树
MidOrder(tree.Right)
PostOrder(tree.Right)
// 再打印根节点
fmt.Print(tree.Data, " ")
}
Expand Down Expand Up @@ -145,7 +145,7 @@ A B D E C F
中序排序:
D B E A F C
后序排序
D B E F C A
D E B F C A
```

层次遍历较复杂,用到一种名叫广度遍历的方法,需要使用辅助的先进先出的队列。
Expand Down Expand Up @@ -320,4 +320,4 @@ func main() {
```
层次排序
A B C D E F
```
```

0 comments on commit b62c4a0

Please sign in to comment.