diff --git a/notes/src/btree_iter.md b/notes/src/btree_iter.md index 4f33273..616945a 100644 --- a/notes/src/btree_iter.md +++ b/notes/src/btree_iter.md @@ -39,7 +39,7 @@ void main(void) { dfs(curNode->right, result); ``` -![begin](https://paste.sainnhe.dev/cSaJ.gif) +![begin](https://share.sainnhe.dev/cSaJ.gif) 中序遍历: @@ -49,7 +49,7 @@ void main(void) { dfs(curNode->right, result); ``` -![medium](https://paste.sainnhe.dev/KJMD.gif) +![medium](https://share.sainnhe.dev/KJMD.gif) 后序遍历: @@ -59,7 +59,7 @@ void main(void) { printf("%d\n", curNode->val); ``` -![end](https://paste.sainnhe.dev/PHbJ.gif) +![end](https://share.sainnhe.dev/PHbJ.gif) ## 深度优先遍历(迭代法) diff --git a/notes/src/combinations.md b/notes/src/combinations.md index 3f5c017..f8ffaaf 100644 --- a/notes/src/combinations.md +++ b/notes/src/combinations.md @@ -4,7 +4,7 @@ ## [77. 组合](https://leetcode.cn/problems/combinations/description/) -![combinations](https://paste.sainnhe.dev/Cytj.png) +![combinations](https://share.sainnhe.dev/Cytj.png) 每个节点存储的数据是什么?是一个 `vector` 类型的数据,代表当前节点的路径。 @@ -43,7 +43,7 @@ void combineDFS(int n, int k, int begin, vector &path, 我们现在来看看能不能优化。 -![optimization](https://paste.sainnhe.dev/NzcF.png) +![optimization](https://share.sainnhe.dev/NzcF.png) 在上图的这种情况中,每一层其实都可以剪掉一些不可能的分支,我们可以对每一层循环的终止条件进行限制,从而剪枝。 @@ -98,7 +98,7 @@ Output: 正确的逻辑应该是如果 `candidates[i] == candidates[i - 1]` 且 `candidates[i - 1]` 使用过,则剪枝。 -![demo](https://paste.sainnhe.dev/DMfz.png) +![demo](https://share.sainnhe.dev/DMfz.png) 那么我们现在要来定义一下什么叫“使用过”。这张图里面有两种“使用过”,第一种使用过是“在树枝上使用过”,第二种使用过是“在数层上使用过”。 diff --git a/notes/src/permute.md b/notes/src/permute.md index 9d8a100..ab4faba 100644 --- a/notes/src/permute.md +++ b/notes/src/permute.md @@ -88,4 +88,4 @@ vector> S0047::permuteUnique(vector &nums) { 这道题本来是想不到回溯法的,但是如果某道题能够拆分成多个步骤,每个步骤都在前一步的基础上进行选择,那么就可以用回溯法。 -![demo](https://paste.sainnhe.dev/ej8H.png) +![demo](https://share.sainnhe.dev/ej8H.png) diff --git a/notes/src/split.md b/notes/src/split.md index 542f5fb..85599a5 100644 --- a/notes/src/split.md +++ b/notes/src/split.md @@ -4,6 +4,6 @@ ## [131. 分割回文串](https://leetcode.cn/problems/palindrome-partitioning/) -![](https://paste.sainnhe.dev/FHTE.jpg) +![](https://share.sainnhe.dev/FHTE.jpg) ## [93. 复原 IP 地址](https://leetcode.cn/problems/restore-ip-addresses/) diff --git a/src/s0008_string_to_integer.cpp b/src/s0008_string_to_integer.cpp index 5b81a11..abf592e 100644 --- a/src/s0008_string_to_integer.cpp +++ b/src/s0008_string_to_integer.cpp @@ -1,6 +1,6 @@ #include "s0008_string_to_integer.hpp" -// 当流程很复杂的时候,画流程图: https://paste.sainnhe.dev/NQxx.png +// 当流程很复杂的时候,画流程图: https://share.sainnhe.dev/NQxx.png class S0008Automaton { string state = "start";