Skip to content

Commit 5aee0fa

Browse files
committed
整理解题技巧及数据结构知识
1 parent d992928 commit 5aee0fa

File tree

5 files changed

+31
-0
lines changed

5 files changed

+31
-0
lines changed

docs/0000-00-note.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@
88
. 树形 DP 套路
99
. 前缀和
1010
.. xref:0523-continuous-subarray-sum.adoc[523. Continuous Subarray Sum]
11+
. 树的 Morris 遍历
12+
.. TODO: 基于 Morris 遍历的中序排列已经掌握,前序,尤其是后续还需要加强。

docs/0000-22-union-find-set.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[#union-find-set]
2+
= Union Find Set 查并集
3+
4+
5+
== 参考资料
6+
7+
. https://leetcode.cn/problems/redundant-connection/solutions/372045/yi-wen-zhang-wo-bing-cha-ji-suan-fa-by-a-fei-8/[684. 冗余连接 - 一文掌握并查集算法^]

docs/0000-data-structure-tree.adoc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[#data-structure-tree]
2+
= 数据结构:树
3+
4+
5+
== Morris 遍历
6+
7+
二叉搜索树相关的的一些题目,很可能就会利用中序遍历是升序序列的特性来处理一下问题。那么,在时间复杂度相同,但空间复杂度都特别优秀的 Morris 遍历就是一个很好的选择。
8+
9+
image::images/0000-ds-tree-01.jpg[]
10+
11+
. xref:0098-validate-binary-search-tree.adoc[98. Validate Binary Search Tree]
12+
. xref:0099-recover-binary-search-tree.adoc[99. Recover Binary Search Tree]
13+
14+
TODO: 加强基于 Morris 遍历的前序和后序遍历练习。
15+
16+
== 参考资料
17+
18+
. https://leetcode.cn/problems/recover-binary-search-tree/solutions/365873/yi-wen-zhang-wo-morrisbian-li-suan-fa-by-a-fei-8/[99. 恢复二叉搜索树 - 一文掌握Morris遍历算法^]

docs/images/0000-ds-tree-01.jpg

576 KB
Loading

docs/index.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ D瓜哥 <https://www.diguage.com/>
88

99
include::0000-00-overview.adoc[leveloffset=+1]
1010

11+
include::0000-data-structure-tree.adoc[leveloffset=+1]
12+
1113
include::0000-01-sliding-window.adoc[leveloffset=+1]
1214

1315
include::0000-02-two-pointer.adoc[leveloffset=+1]
@@ -50,6 +52,8 @@ include::0000-20-transform-and-conquer.adoc[leveloffset=+1]
5052

5153
include::0000-21-dynamic-programming.adoc[leveloffset=+1]
5254

55+
include::0000-22-union-find-set.adoc[leveloffset=+1]
56+
5357
// :sectnums:
5458

5559
include::0001-two-sum.adoc[leveloffset=+1]

0 commit comments

Comments
 (0)