Update image url
ci/woodpecker/push/test Pipeline was successful Details

This commit is contained in:
Sainnhe Park 2023-02-18 13:55:17 +08:00
parent 7e43421a71
commit 4d93e5a150
5 changed files with 9 additions and 9 deletions

View File

@ -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)
## 深度优先遍历(迭代法)

View File

@ -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<int>` 类型的数据,代表当前节点的路径。
@ -43,7 +43,7 @@ void combineDFS(int n, int k, int begin, vector<int> &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)
那么我们现在要来定义一下什么叫“使用过”。这张图里面有两种“使用过”,第一种使用过是“在树枝上使用过”,第二种使用过是“在数层上使用过”。

View File

@ -88,4 +88,4 @@ vector<vector<int>> S0047::permuteUnique(vector<int> &nums) {
这道题本来是想不到回溯法的,但是如果某道题能够拆分成多个步骤,每个步骤都在前一步的基础上进行选择,那么就可以用回溯法。
![demo](https://paste.sainnhe.dev/ej8H.png)
![demo](https://share.sainnhe.dev/ej8H.png)

View File

@ -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/)

View File

@ -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";