Skip to content

Commit bb2a96f

Browse files
author
lucifer
committed
feat: 使用新浪图床
1 parent e97d8ef commit bb2a96f

File tree

160 files changed

+414
-414
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

160 files changed

+414
-414
lines changed

README.en.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
---
1515

16-
![leetcode.jpeg](./assets/leetcode.jpeg)
16+
![leetcode.jpeg](https://tva1.sinaimg.cn/large/007S8ZIlly1ghltwf4xivj30dw0780sm.jpg)
1717

1818
This essay records the course of and my emotion to this project from initialization to 10,000 stars.
1919
[Milestone for 10,000+ stars](./thanksGiving.md)
@@ -22,7 +22,7 @@ If you are interested in this project, **do not mean your star**. This project w
2222

2323
## Introduction
2424

25-
![leetcode.jpeg](./assets/leetcode.jpeg)
25+
![leetcode.jpeg](https://tva1.sinaimg.cn/large/007S8ZIlly1ghltwf4xivj30dw0780sm.jpg)
2626

2727
LeetCode Solutions: A Journey of Problem Solving.
2828

@@ -55,7 +55,7 @@ If you want to do some contributions or collaborations, just feel free to contac
5555
- Here will be the place to update Anki Flashcards in the future as well.
5656
- Here is a mind mapping graph showing the summary of categorizations of problems that are questioned frequently in interviews. We could analyze according to the information in the graph.
5757

58-
![leetcode-zhihu](./assets//leetcode-zhihu.jpg)
58+
![leetcode-zhihu](https://tva1.sinaimg.cn/large/007S8ZIlly1ghltwgi53bj30k00jx0te.jpg)
5959

6060
(Picture credited by [LeetCode-cn](https://www.zhihu.com/question/24964987/answer/586425979).)
6161

@@ -80,15 +80,15 @@ The data structures mainly include:
8080

8181
[0547.friend-circles](./problems/547.friend-circles-en.md) :
8282

83-
![friend circle BFS](./assets/problems/547.friend-circle-bfs.png)
83+
![friend circle BFS](https://tva1.sinaimg.cn/large/007S8ZIlly1ghltwh1getj30u0140tdc.jpg)
8484

8585
[backtrack problems](./problems/90.subsets-ii-en.md):
8686

87-
![backtrack](./assets/problems/backtrack.png)
87+
![backtrack](https://tva1.sinaimg.cn/large/007S8ZIlly1ghltwhwowgj30n20nptas.jpg)
8888

8989
[0454.4-sum-ii](./problems/454.4-sum-ii.en.md) :
9090

91-
![454.4-sum-ii](./assets/problems/454.4-sum-ii.png)
91+
![454.4-sum-ii](https://tva1.sinaimg.cn/large/007S8ZIlly1ghltwivf65j30le0deab3.jpg)
9292

9393
## Portals
9494

@@ -173,11 +173,11 @@ We're still on the early stage, so feedback from community is very welcome. For
173173

174174
### QQ (For China Region)
175175

176-
![qq-group-chat](./assets/qq-group-chat.png)
176+
![qq-group-chat](https://tva1.sinaimg.cn/large/007S8ZIlly1ghltwje9plj3060060wel.jpg)
177177

178178
### WeChat (For China Region)
179179

180-
![wechat-group-chat](./assets/wechat-group-chat.jpeg)
180+
![wechat-group-chat](https://tva1.sinaimg.cn/large/007S8ZIlly1ghltwjrk6ij30e80e875j.jpg)
181181

182182
(Add this bot and reply "leetcode" to join the group.)
183183

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
---
2222

23-
![leetcode.jpeg](./assets/leetcode.jpeg)
23+
![leetcode.jpeg](https://tva1.sinaimg.cn/large/007S8ZIlly1ghluelm27rj30dw0780sm.jpg)
2424

2525
- 2019-07-10 :[纪念项目 Star 突破 1W 的一个短文](./thanksGiving.md), 记录了项目的"兴起"之路,大家有兴趣可以看一下,如果对这个项目感兴趣,请**点击一下 Star**, 项目会**持续更新**,感谢大家的支持。
2626

@@ -29,7 +29,7 @@
2929
- 2020-04-12: [项目突破三万 Star](./thanksGiving3.md)
3030
- 2020-04-14: 官网`力扣加加`上线啦 💐💐💐💐💐,有专题讲解,每日一题,下载区和视频题解,后续会增加更多内容,还不赶紧收藏起来?地址:http://leetcode-solution.cn/
3131

32-
![](https://tva1.sinaimg.cn/large/007S8ZIlly1gdvenxvjlsj30z90dtdhw.jpg)
32+
![](https://tva1.sinaimg.cn/large/007S8ZIlly1ghluemaoj3j30z90dtmy5.jpg)
3333

3434
## 非科学人士看过来
3535

@@ -85,7 +85,7 @@ leetcode 题解,记录自己的 leetcode 解题之路。
8585

8686
- 这里有一张互联网公司面试中经常考察的问题类型总结的思维导图,我们可以结合图片中的信息分析一下。
8787

88-
![leetcode-zhihu](./assets//leetcode-zhihu.jpg)
88+
![leetcode-zhihu](https://tva1.sinaimg.cn/large/007S8ZIlly1ghluennxvrj30k00jx0te.jpg)
8989

9090
(图片来自 leetcode)
9191

@@ -110,7 +110,7 @@ leetcode 题解,记录自己的 leetcode 解题之路。
110110

111111
[0042.trapping-rain-water](./problems/42.trapping-rain-water.md):
112112

113-
![0042.trapping-rain-water](./assets/problems/42.trapping-rain-water-1.png)
113+
![0042.trapping-rain-water](https://tva1.sinaimg.cn/large/007S8ZIlly1ghlueqdwy3j30bg04hmx3.jpg)
114114

115115
[0547.friend-circles](./problems/547.friend-circles-en.md):
116116

@@ -375,11 +375,11 @@ anki - 文件 - 导入 - 下拉格式选择“打包的 anki 集合”,然后
375375

376376
- [每日一题汇总](./daily/)
377377

378-
![每日一题汇总](./assets/daily-summary.png)
378+
![每日一题汇总](https://tva1.sinaimg.cn/large/007S8ZIlly1ghluequftmj30p80nrmzc.jpg)
379379

380380
- [每日一题认领区](https://github.com/azl397985856/leetcode/projects/1)
381381

382-
![每日一题认领区](./assets/daily-board.png)
382+
![每日一题认领区](https://tva1.sinaimg.cn/large/007S8ZIlly1ghlues83n0j315f0i8gug.jpg)
383383

384384
### 计划
385385

daily/2019-06-27.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ function sqrt(num) {
5252
也就是说,函数上任一点(x,f(x))处的切线斜率是2x。
5353
那么,x-f(x)/(2x)就是一个比x更接近的近似值。代入 f(x)=x^2-a得到x-(x^2-a)/(2x),也就是(x+a/x)/2。
5454

55-
![2019-06-27](../assets/daily/2019-06-27.gif)
55+
![2019-06-27](https://tva1.sinaimg.cn/large/007S8ZIlly1ghludzm5xsg30ip0dct9s.gif)
5656

5757
(图片来自Wikipedia)
5858

daily/2019-07-10.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
这个题目解释起来比较费劲,我在网上找了一个现成的图来解释一下:
3030

31-
![weight-ball](../assets/daily/weight-ball.jpg)
31+
![weight-ball](https://tva1.sinaimg.cn/large/007S8ZIlly1ghlue317j6j30d80dcta4.jpg)
3232

3333
图中“1+”是指“1号小球为重”这一可能性。“1-”是指“1号小球为轻”这一可能性。
3434
一开始一共有24种可能性。

daily/2019-07-23.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
1515
```
1616

17-
![2019-07-23](../assets/daily/2019-07-23.jpeg)
17+
![2019-07-23](https://tva1.sinaimg.cn/large/007S8ZIlly1ghludxwb1aj30py1hc0tr.jpg)
1818

1919
## 参考答案
2020

daily/2019-07-26.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
## 题目描述
1010

11-
![2019-07-26](../assets/daily/2019-07-26.jpeg)
11+
![2019-07-26](https://tva1.sinaimg.cn/large/007S8ZIlly1ghludytrtlj30py1hcas1.jpg)
1212

1313
## 参考答案
1414

daily/2019-07-29.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Example 2:
3737
2. row->col、col->row 的切换都伴随读取的初始位置的变化;
3838
3. 结束条件是row头>row尾或者col顶>col底
3939

40-
![剥洋葱](../assets/problems/54.spiral-matrix.jpg)
40+
![剥洋葱](https://tva1.sinaimg.cn/large/007S8ZIlly1ghlue0ni96j30b00bdq35.jpg)
4141

4242
时间复杂度O(m*n), 空间复杂度O(1)
4343

daily/2019-07-30.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
那么沿着这条纬线(记为E纬线)上任意一点向东走一英里,始终会回到原点,只是走的圈数不同而已。
2323
根据题目倒推,在这条纬线以北一英里存在一条纬线(记为N纬线),从N纬线的任意一点向南一英里到达E纬线W点,沿着E纬线向东一英里,必会回到W点,再向北走一英里恰好可以回到起点。北极点可能包含在这个集合中,也可能不在。
2424
如下图示供参考:
25-
![earth-problem](../assets/daily/2019-07-30.jpg)
25+
![earth-problem](https://tva1.sinaimg.cn/large/007S8ZIlly1ghlue5gt6uj30u01441l0.jpg)
2626

2727
所以答案是无数个点
2828

daily/2019-08-13.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ m 和 n =150,肯定超时。
6161

6262
最后将探测结果进行合并即可。合并的条件就是当前单元既能流入太平洋又能流入大西洋。
6363

64-
![集合](https://user-images.githubusercontent.com/5937331/63209454-7c921a80-c113-11e9-8d74-82d0476b8828.png)
64+
![集合](https://tva1.sinaimg.cn/large/007S8ZIlly1ghlue21s7aj30dw08cglo.jpg)
6565
扩展:
6666

6767
如果题目改为能够流入大西洋或者太平洋,我们只需要最后合并的时候,条件改为求或即可

problems/101.symmetric-tree.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ https://leetcode-cn.com/problems/symmetric-tree/
4242

4343
看到这题的时候,我的第一直觉是 DFS。然后我就想:`如果左子树是镜像,并且右子树也是镜像,是不是就说明整体是镜像?`。经过几秒的思考, 这显然是不对的,不符合题意。
4444

45-
![](https://tva1.sinaimg.cn/large/007S8ZIlly1gfbmeoo45bj31200iuabh.jpg)
45+
![](https://tva1.sinaimg.cn/large/007S8ZIlly1ghlu96e83wj31200iugme.jpg)
4646

4747
很明显其中左子树中的节点会和右子树中的节点进行比较,我把比较的元素进行了颜色区分,方便大家看。
4848

@@ -52,7 +52,7 @@ https://leetcode-cn.com/problems/symmetric-tree/
5252

5353
这种方法可行,但是需要 N 的空间(N 为节点总数)。我想到如果两者可以同时进行遍历,是不是就省去了哈希表的开销。
5454

55-
![](https://tva1.sinaimg.cn/large/007S8ZIlly1gfbso8u6myj31a30u0tf5.jpg)
55+
![](https://tva1.sinaimg.cn/large/007S8ZIlly1ghlu9a7sy7j31a30u0408.jpg)
5656

5757
如果不明白的话,我举个简单例子:
5858

@@ -112,4 +112,4 @@ class Solution:
112112

113113
大家也可以关注我的公众号《脑洞前端》获取更多更新鲜的 LeetCode 题解
114114

115-
![](https://tva1.sinaimg.cn/large/007S8ZIlly1gfaq00p8stj30x20iw7b0.jpg)
115+
![](https://tva1.sinaimg.cn/large/007S8ZIlly1ghlu9b4p9ej30x20iwjtf.jpg)

problems/1031.maximum-sum-of-two-non-overlapping-subarrays.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ L + M <= A.length <= 1000
4545

4646
题目中要求在前N(数组长度)个数中找出长度分别为L和M的非重叠子数组之和的最大值, 因此, 我们可以定义数组A中前i个数可构成的非重叠子数组L和M的最大值为SUMM[i], 并找到SUMM[i]和SUMM[i-1]的关系, 那么最终解就是SUMM[N]. 以下为图解:
4747

48-
![1031.Maximum Sum of Two Non-Overlapping Subarrays](../assets/problems/1031.maximum-sum-of-two-non-overlapping-subarrays.png)
48+
![1031.Maximum Sum of Two Non-Overlapping Subarrays](https://tva1.sinaimg.cn/large/007S8ZIlly1ghlu02o63mj30iz0m9420.jpg)
4949

5050
## 关键点解析
5151

problems/105.Construct-Binary-Tree-from-Preorder-and-Inorder-Traversal.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ If you can't figure out how to get the index of the left and right child, please
7272
- according to the properties of preoder traversal, all right sub-tree nodes are behine all left sub-tree nodes. The length of left sub-tree can help us to divide left and right sub-trees.
7373
- the length of left sub-tree can be find in the inorder traversal. The location of current node is `inRoot`(or whatever your call it). The start index of current inorder array is `inStart`(or whatever your call it). So, the lenght of the left sub-tree is `leftChldLen = inRoot - inStart`.
7474

75-
![explain](../assets/problems/105.index_explain.jpg)
75+
![explain](https://tva1.sinaimg.cn/large/007S8ZIlly1ghltyu9s05j30o00hnq4y.jpg)
7676

7777
## 代码/Code
7878

problems/108.convert-sorted-array-to-binary-search-tree.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ https://leetcode-cn.com/problems/convert-sorted-array-to-binary-search-tree/
3737

3838
形象一点来看就像你提起一根绳子,从中点提的话才能使得两边绳子长度相差最小。
3939

40-
![image.png](https://pic.leetcode-cn.com/c24c2280aff65bfa06f94dc000bd7475a100903e5c889ee6ebafa014fd63fe3e-image.png)
40+
![image.png](https://tva1.sinaimg.cn/large/007S8ZIlly1ghltysdgtvj30nj0hv3z2.jpg)
4141

4242
## 关键点
4343

problems/11.container-with-most-water.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ https://leetcode-cn.com/problems/container-with-most-water/description/
99
说明:你不能倾斜容器,且 n 的值至少为 2。
1010

1111

12-
![11.container-with-most-water-question](../assets/problems/11.container-with-most-water-question.jpg)
12+
![11.container-with-most-water-question](https://tva1.sinaimg.cn/large/007S8ZIlly1ghlu4wyztmj30m90anwep.jpg)
1313

1414

1515
图中垂直线代表输入数组 [1,8,6,2,5,4,8,3,7]。在此情况下,容器能够容纳水(表示为蓝色部分)的最大值为 49。
@@ -62,7 +62,7 @@ return max;
6262

6363
如图:
6464

65-
![11.container-with-most-water](../assets/problems/11.container-with-most-water.png)
65+
![11.container-with-most-water](https://tva1.sinaimg.cn/large/007S8ZIlly1ghlu4xr7ovj30bm0gct9b.jpg)
6666

6767
比如我们计算 n 面积的时候,假如左侧的线段高度比右侧的高度低,那么我们通过左移右指针来将长度缩短为 n-1 的做法是没有意义的,
6868
因为`新的形成的面积变成了(n-1) * heightOfLeft 这个面积一定比刚才的长度为 n 的面积 (n * heightOfLeft) 小`
@@ -154,4 +154,4 @@ class Solution:
154154
关注公众号力扣加加,努力用清晰直白的语言还原解题思路,并且有大量图解,手把手教你识别套路,高效刷题。
155155

156156

157-
![](https://tva1.sinaimg.cn/large/007S8ZIlly1gfcuzagjalj30p00dwabs.jpg)
157+
![](https://tva1.sinaimg.cn/large/007S8ZIlly1ghlu4yqnsgj30p00dwt9t.jpg)

problems/1104.path-in-zigzag-labelled-binary-tree.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ https://leetcode-cn.com/problems/path-in-zigzag-labelled-binary-tree/description
1010

1111
而偶数行(即,第二行、第四行、第六行……)中,按从右到左的顺序进行标记。
1212

13-
![](https://tva1.sinaimg.cn/large/006tNbRwgy1gaihhb1ysbj310p0gu3zx.jpg)
13+
![](https://tva1.sinaimg.cn/large/007S8ZIlly1ghlu59hpv3j310p0gumxz.jpg)
1414

1515
给你树上某一个节点的标号 label,请你返回从根节点到该标号为 label 节点的路径,该路径是由途经的节点标号所组成的。
1616

@@ -37,17 +37,17 @@ https://leetcode-cn.com/problems/path-in-zigzag-labelled-binary-tree/description
3737

3838
如果是这样的话,这道题应该是 easy 难度,代码也不难写出。我们继续考虑之字形。我们不妨先观察一下,找下规律。
3939

40-
![](https://tva1.sinaimg.cn/large/006tNbRwly1gaihn0ktanj30lu093gme.jpg)
40+
![](https://tva1.sinaimg.cn/large/007S8ZIlly1ghlu5au9j8j30lu093gmm.jpg)
4141

4242
以上图最后一行为例,对于 15 节点,之字变换之前对应的应该是 8 节点。14 节点对应的是 9 节点。。。
4343

4444
全部列举出来是这样的:
4545

46-
![](https://tva1.sinaimg.cn/large/006tNbRwly1gaihota82cj30mk0b6wfp.jpg)
46+
![](https://tva1.sinaimg.cn/large/007S8ZIlly1ghlu5d6os7j30mk0b6wfw.jpg)
4747

4848
我们发现之字变换前后的 label 相加是一个定值。
4949

50-
![](https://tva1.sinaimg.cn/large/006tNbRwly1gaihpnlpicj309b08dmxl.jpg)
50+
![](https://tva1.sinaimg.cn/large/007S8ZIlly1ghlu5f240wj309b08dmxj.jpg)
5151

5252
因此我们只需要求解出每一层的这个定值,然后减去当前值就好了。(注意我们不需要区分偶数行和奇数行)
5353
问题的关键转化为求解这个定值,这个定值其实很好求,因为每一层的最大值和最小值我们很容易求,而最大值和最小值的和正是我们要求的这个数字。

problems/113.path-sum-ii.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Return:
4141

4242
我们先来看下通用解法的解题思路,我画了一张图:
4343

44-
![](https://tva1.sinaimg.cn/large/007S8ZIlly1gfyrnqi82ej31190u0e81.jpg)
44+
![](https://tva1.sinaimg.cn/large/007S8ZIlly1ghltwyr0bkj31190u0jw4.jpg)
4545

4646
> 图是 [78.subsets](https://github.com/azl397985856/leetcode/blob/master/problems/78.subsets.md),都差不多,仅做参考。
4747

problems/1131.maximum-of-absolute-value-expression.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ https://leetcode-cn.com/problems/maximum-of-absolute-value-expression/descriptio
3636

3737
> 红色竖线表示的是绝对值的符号
3838
39-
![](https://tva1.sinaimg.cn/large/006tNbRwly1gamo3dx1bej30q003y74f.jpg)
39+
![](https://tva1.sinaimg.cn/large/007S8ZIlly1ghlu154cgej30q003y3yv.jpg)
4040

4141
我们对其进行分类讨论,有如下八种情况:
4242

@@ -45,7 +45,7 @@ https://leetcode-cn.com/problems/maximum-of-absolute-value-expression/descriptio
4545
> |i - j| 两种情况
4646
> 因此一共是 2 \* 2 \* 2 = 8 种
4747
48-
![](https://tva1.sinaimg.cn/large/006tNbRwgy1gamosnsknej30tg0viq6w.jpg)
48+
![](https://tva1.sinaimg.cn/large/007S8ZIlly1ghlu1c4km1j30tg0viq7v.jpg)
4949

5050
由于 i 和 j 之前没有大小关系,也就说二者可以相互替代。因此:
5151

@@ -58,11 +58,11 @@ https://leetcode-cn.com/problems/maximum-of-absolute-value-expression/descriptio
5858

5959
为了方便,我们将 i 和 j 都提取到一起:
6060

61-
![](https://tva1.sinaimg.cn/large/006tNbRwly1gamp5sizefj30qs0g6gmx.jpg)
61+
![](https://tva1.sinaimg.cn/large/007S8ZIlly1ghlu1j6ueoj30qs0g6di2.jpg)
6262

6363
容易看出等式的最大值就是前面的最大值,和后面最小值的差值。如图:
6464

65-
![](https://tva1.sinaimg.cn/large/006tNbRwly1gamp9c3g9lj30r20kcabx.jpg)
65+
![](https://tva1.sinaimg.cn/large/007S8ZIlly1ghlu1oczs3j30r20kctb5.jpg)
6666

6767
再仔细观察,会发现前面部分和后面部分是一样的,原因还是上面所说的 i 和 j 可以互换。因此我们要做的就是:
6868

@@ -97,17 +97,17 @@ class Solution:
9797

9898
### 思路
9999

100-
![](https://tva1.sinaimg.cn/large/006tNbRwly1gampnn032tj308l0a8mxl.jpg)
100+
![](https://tva1.sinaimg.cn/large/007S8ZIlly1ghlu23wcsoj308l0a8aak.jpg)
101101

102102
(图来自: https://zh.wikipedia.org/wiki/%E6%9B%BC%E5%93%88%E9%A0%93%E8%B7%9D%E9%9B%A2)
103103

104104
一维曼哈顿距离可以理解为一条线上两点之间的距离: |x1 - x2|,其值为 max(x1 - x2, x2 - x1)
105105

106-
![](https://tva1.sinaimg.cn/large/006tNbRwgy1gampr362oaj30l004mdfv.jpg)
106+
![](https://tva1.sinaimg.cn/large/007S8ZIlly1ghlu2729n3j30l004mwel.jpg)
107107

108108
在平面上,坐标(x1, y1)的点 P1 与坐标(x2, y2)的点 P2 的曼哈顿距离为:|x1-x2| + |y1 - y2|,其值为 max(x1 - x2 + y1 - y2, x2 - x1 + y1 - y2, x1 - x2 + y2 - y1, x2 -x1 + y2 - y1)
109109

110-
![](https://tva1.sinaimg.cn/large/006tNbRwgy1gampwhua9fj30rq0lmdgl.jpg)
110+
![](https://tva1.sinaimg.cn/large/007S8ZIlly1ghlu29xa0jj30rq0lmwga.jpg)
111111

112112
然后这道题目是更复杂的三维曼哈顿距离,其中(i, arr[i], arr[j])可以看作三位空间中的一个点,问题转化为曼哈顿距离最远的两个点的距离。
113113
延续上面的思路,|x1-x2| + |y1 - y2| + |z1 - z2|,其值为 :
@@ -186,6 +186,6 @@ class Solution:
186186

187187
- [1030. 距离顺序排列矩阵单元格](https://leetcode-cn.com/problems/matrix-cells-in-distance-order/)
188188

189-
![](https://tva1.sinaimg.cn/large/006tNbRwly1gamq577lgsj30xd0jzwjb.jpg)
189+
![](https://tva1.sinaimg.cn/large/007S8ZIlly1ghlu2h4bnaj30xd0jzgom.jpg)
190190

191191
- [1162. 地图分析](https://leetcode-cn.com/problems/as-far-from-land-as-possible/)

problems/1168.optimize-water-distribution-in-a-village-cn.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ pipes[i][0] != pipes[i][1]
3737
## 思路
3838

3939

40-
![example 1](../assets/problems/1168.optimize-water-distribution-in-a-village-example1.png)
40+
![example 1](https://tva1.sinaimg.cn/large/007S8ZIlly1ghlu0bzlucj30ci0bc3z0.jpg)
4141

4242
题意,在每个城市打井需要一定的花费,也可以用其他城市的井水,城市之间建立连接管道需要一定的花费,怎么样安排可以花费最少的前灌溉所有城市。
4343

@@ -65,7 +65,7 @@ pipes[i][0] != pipes[i][1]
6565

6666
如图:
6767

68-
![minimum cost](../assets/problems/1168.optimize-water-distribution-in-a-village-1.png)
68+
![minimum cost](https://tva1.sinaimg.cn/large/007S8ZIlly1ghlu0jq6djj31400u0nfs.jpg)
6969

7070
从图中可以看到,最后所有的节点都是连通的。
7171

problems/1168.optimize-water-distribution-in-a-village-en.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ pipes[i][0] != pipes[i][1]
3434
```
3535
example 1 pic:
3636

37-
![example 1](../assets/problems/1168.optimize-water-distribution-in-a-village-example1.png)
37+
![example 1](https://tva1.sinaimg.cn/large/007S8ZIlly1ghltymocpgj30ci0bc3z0.jpg)
3838

3939

4040
## Solution
@@ -61,7 +61,7 @@ For example:`n = 5, wells=[1,2,2,3,2], pipes=[[1,2,1],[2,3,1],[4,5,7]]`
6161

6262
As below pic:
6363

64-
![minimum cost](../assets/problems/1168.optimize-water-distribution-in-a-village-1.png)
64+
![minimum cost](https://tva1.sinaimg.cn/large/007S8ZIlly1ghltyopr5zj31400u0nfs.jpg)
6565

6666
From pictures, we can see that all nodes already connected with minimum costs.
6767

problems/121.best-time-to-buy-and-sell-stock.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Explanation: In this case, no transaction is done, i.e. max profit = 0.
3636

3737
用图表示的话就是这样:
3838

39-
![](https://tva1.sinaimg.cn/large/0082zybply1gbx7rzp9e1j30jg0c23zs.jpg)
39+
![](https://tva1.sinaimg.cn/large/007S8ZIlly1ghlu6k05dqj30jg0c20tf.jpg)
4040

4141
## 关键点解析
4242

0 commit comments

Comments
 (0)