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 解题之路。
119119
120120- [ 数据结构总览] ( ./thinkings/basic-data-structure.md )
121121- [ 链表专题] ( ./thinkings/linked-list.md ) 🆕
122+ - [ 树专题] ( ./thinkings/tree.md ) 🆕
122123<!-- - [基础算法](./thinkings/basic-algorithm.md) -->
123124- [ 二叉树的遍历] ( ./thinkings/binary-tree-traversal.md )
124125- [ 动态规划] ( ./thinkings/dynamic-programming.md )
Original file line number Diff line number Diff line change 66* [ 第一章 - 算法专题] ( thinkings/README.md )
77 * [ 数据结构] ( thinkings/basic-data-structure.md )
88 * [ 链表专题] ( thinkings/linked-list.md )
9+ * [ 树专题] ( ./thinkings/tree.md )
910 * [ 二叉树的遍历] ( thinkings/binary-tree-traversal.md )
1011 * [ 动态规划] ( thinkings/dynamic-programming.md )
1112 * [ 哈夫曼编码和游程编码] ( thinkings/run-length-encode-and-huffman-encode.md )
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ BFS 的关键点在于如何记录每一层次是否遍历完成, 我们可以
7676其实这个也是属于根节点先不输出,并且根节点是最后输出。 这里可以采用一种讨巧的做法,
7777就是记录当前节点状态,如果:
7878
79- 1 . 当前节点是叶子节点或者
79+ 1 . 当前节点是叶子节点或者
8080
81812 . 当前节点的左右子树都已经遍历过了,那么就可以出栈了。
8282
You can’t perform that action at this time.
0 commit comments