File tree Expand file tree Collapse file tree 4 files changed +1693
-1
lines changed Expand file tree Collapse file tree 4 files changed +1693
-1
lines changed Original file line number Diff line number Diff line change @@ -119,6 +119,7 @@ leetcode 题解,记录自己的 leetcode 解题之路。
119
119
120
120
- [ 数据结构总览] ( ./thinkings/basic-data-structure.md )
121
121
- [ 链表专题] ( ./thinkings/linked-list.md ) 🆕
122
+ - [ 树专题] ( ./thinkings/tree.md ) 🆕
122
123
<!-- - [基础算法](./thinkings/basic-algorithm.md) -->
123
124
- [ 二叉树的遍历] ( ./thinkings/binary-tree-traversal.md )
124
125
- [ 动态规划] ( ./thinkings/dynamic-programming.md )
Original file line number Diff line number Diff line change 6
6
* [ 第一章 - 算法专题] ( thinkings/README.md )
7
7
* [ 数据结构] ( thinkings/basic-data-structure.md )
8
8
* [ 链表专题] ( thinkings/linked-list.md )
9
+ * [ 树专题] ( ./thinkings/tree.md )
9
10
* [ 二叉树的遍历] ( thinkings/binary-tree-traversal.md )
10
11
* [ 动态规划] ( thinkings/dynamic-programming.md )
11
12
* [ 哈夫曼编码和游程编码] ( thinkings/run-length-encode-and-huffman-encode.md )
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ BFS 的关键点在于如何记录每一层次是否遍历完成, 我们可以
76
76
其实这个也是属于根节点先不输出,并且根节点是最后输出。 这里可以采用一种讨巧的做法,
77
77
就是记录当前节点状态,如果:
78
78
79
- 1 . 当前节点是叶子节点或者
79
+ 1 . 当前节点是叶子节点或者
80
80
81
81
2 . 当前节点的左右子树都已经遍历过了,那么就可以出栈了。
82
82
You can’t perform that action at this time.
0 commit comments