Skip to content

Commit f57c9b9

Browse files
authored
chore: update path (doocs#2262)
1 parent acda678 commit f57c9b9

File tree

20 files changed

+21
-21
lines changed

20 files changed

+21
-21
lines changed

lcci/08.02.Robot in a Grid/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<!-- 这里写题目描述 -->
88
<p>设想有个机器人坐在一个网格的左上角,网格 r 行 c 列。机器人只能向下或向右移动,但不能走到一些被禁止的网格(有障碍物)。设计一种算法,寻找机器人从左上角移动到右下角的路径。</p>
9-
![](./images/robot_maze.png)
9+
![](https://fastly.jsdelivr.net/gh/doocs/leetcode@main/lcci/08.02.Robot%20in%20a%20Grid/images/robot_maze.png)
1010
<p>网格中的障碍物和空位置分别用 <code>1</code> 和 <code>0</code> 来表示。</p>
1111
<p>返回一条可行的路径,路径由经过的网格的行号和列号组成。左上角为 0 行 0 列。</p>
1212
<p><strong>示例&nbsp;1:</strong></p>

lcci/08.02.Robot in a Grid/README_EN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
## Description
66

77
<p>Imagine a robot sitting on the upper left corner of grid with r rows and c columns. The robot can only move in two directions, right and down, but certain cells are &quot;off limits&quot; such that the robot cannot step on them. Design an algorithm to find a path for the robot from the top left to the bottom right.</p>
8-
![](./images/robot_maze.png)
8+
![](https://fastly.jsdelivr.net/gh/doocs/leetcode@main/lcci/08.02.Robot%20in%20a%20Grid/images/robot_maze.png)
99
<p>&quot;off limits&quot; and empty grid are represented by&nbsp;<code>1</code> and&nbsp;<code>0</code>&nbsp;respectively.</p>
1010
<p>Return a valid path, consisting of row number and column number of grids in the path.</p>
1111
<p><strong>Example&nbsp;1:</strong></p>

lcci/16.20.T9/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<!-- 这里写题目描述 -->
88

99
<p>在老式手机上,用户通过数字键盘输入,手机将提供与这些数字相匹配的单词列表。每个数字映射到0至4个字母。给定一个数字序列,实现一个算法来返回匹配单词的列表。你会得到一张含有有效单词的列表。映射如下图所示:</p>
10-
![](./images/17_telephone_keypad.png)
10+
![](https://fastly.jsdelivr.net/gh/doocs/leetcode@main/lcci/16.20.T9/images/17_telephone_keypad.png)
1111
<p><strong>示例 1:</strong></p>
1212
<pre><strong>输入:</strong> num = &quot;8733&quot;, words = [&quot;tree&quot;, &quot;used&quot;]
1313
<strong>输出:</strong> [&quot;tree&quot;, &quot;used&quot;]

lcci/16.20.T9/README_EN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
## Description
66

77
<p>On old cell phones, users typed on a numeric keypad and the phone would provide a list of words that matched these numbers. Each digit mapped to a set of 0&nbsp;- 4 letters. Implement an algo&shy;rithm to return a list of matching words, given a sequence of digits. You are provided a list of valid words. The mapping is shown in the diagram below:</p>
8-
![](./images/17_telephone_keypad.png)
8+
![](https://fastly.jsdelivr.net/gh/doocs/leetcode@main/lcci/16.20.T9/images/17_telephone_keypad.png)
99
<p><strong>Example 1:</strong></p>
1010
<pre>
1111

lcci/17.12.BiNode/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
时间复杂度 $O(n)$。
3535

36-
[897. 递增顺序查找树](/solution/0800-0899/0897.Increasing%20Order%20Search%20Tree/README.md)
36+
[897. 递增顺序查找树](https://github.com/doocs/leetcode/blob/main/solution/0800-0899/0897.Increasing%20Order%20Search%20Tree/README.md)
3737

3838
<!-- tabs:start -->
3939

lcci/17.21.Volume of Histogram/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<!-- 这里写题目描述 -->
88
<p>给定一个直方图(也称柱状图),假设有人从上面源源不断地倒水,最后直方图能存多少水量?直方图的宽度为 1。</p>
99

10-
![](./images/rainwatertrap.png)
10+
![](https://fastly.jsdelivr.net/gh/doocs/leetcode@main/lcci/17.21.Volume%20of%20Histogram/images/rainwatertrap.png)
1111

1212
<p><small>上面是由数组 [0,1,0,2,1,0,1,3,2,1,2,1] 表示的直方图,在这种情况下,可以接 6 个单位的水(蓝色部分表示水)。&nbsp;<strong>感谢 Marcos</strong> 贡献此图。</small></p>
1313

lcci/17.21.Volume of Histogram/README_EN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<p>Imagine a histogram (bar graph). Design an algorithm to compute the volume of water it could hold if someone poured water across the top. You can assume that each histogram bar has width 1.</p>
88

9-
![](./images/rainwatertrap.png)
9+
![](https://fastly.jsdelivr.net/gh/doocs/leetcode@main/lcci/17.21.Volume%20of%20Histogram/images/rainwatertrap.png)
1010

1111
<p><small>The above elevation map is represented by array [0,1,0,2,1,0,1,3,2,1,2,1]. In this case, 6 units of water (blue section) are being trapped. Thanks <strong>Marcos</strong> for contributing this image!</small></p>
1212

solution/0000-0099/0008.String to Integer (atoi)/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898

9999
时间复杂度 $O(n)$,其中 $n$ 为字符串的长度。我们只需要依次处理所有字符。空间复杂度 $O(1)$。
100100

101-
[面试题 67. 把字符串转换成整数](/lcof/面试题67.%20把字符串转换成整数/README.md)
101+
[面试题 67. 把字符串转换成整数](https://github.com/doocs/leetcode/blob/main/lcof/面试题67.%20把字符串转换成整数/README.md)
102102

103103
<!-- tabs:start -->
104104

solution/0100-0199/0106.Construct Binary Tree from Inorder and Postorder Traversal/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
### 方法一:递归
4444

45-
思路同 [105. 从前序与中序遍历序列构造二叉树](/solution/0100-0199/0105.Construct%20Binary%20Tree%20from%20Preorder%20and%20Inorder%20Traversal/README.md)
45+
思路同 [105. 从前序与中序遍历序列构造二叉树](https://github.com/doocs/leetcode/blob/main/solution/0100-0199/0105.Construct%20Binary%20Tree%20from%20Preorder%20and%20Inorder%20Traversal/README.md)
4646

4747
时间复杂度 $O(n)$,空间复杂度 $O(n)$。其中 $n$ 是二叉树的节点个数。
4848

solution/0100-0199/0106.Construct Binary Tree from Inorder and Postorder Traversal/README_EN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
### Solution 1: Recursion
4040

41-
The approach is the same as in [105. Construct Binary Tree from Preorder and Inorder Traversal](/solution/0100-0199/0105.Construct%20Binary%20Tree%20from%20Preorder%20and%20Inorder%20Traversal/README_EN.md).
41+
The approach is the same as in [105. Construct Binary Tree from Preorder and Inorder Traversal](https://github.com/doocs/leetcode/blob/main/solution/0100-0199/0105.Construct%20Binary%20Tree%20from%20Preorder%20and%20Inorder%20Traversal/README_EN.md).
4242

4343
The time complexity is $O(n)$, and the space complexity is $O(n)$. Here, $n$ is the number of nodes in the binary tree.
4444

solution/0100-0199/0107.Binary Tree Level Order Traversal II/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545
### 方法一:BFS
4646

47-
思路同 [102](/solution/0100-0199/0102.Binary%20Tree%20Level%20Order%20Traversal/README.md),最后反转一下结果即可。
47+
思路同 [102](https://github.com/doocs/leetcode/blob/main/solution/0100-0199/0102.Binary%20Tree%20Level%20Order%20Traversal/README.md),最后反转一下结果即可。
4848

4949
时间复杂度 $O(n)$,空间复杂度 $O(n)$。其中 $n$ 是二叉树的节点个数。
5050

solution/0100-0199/0107.Binary Tree Level Order Traversal II/README_EN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
### Solution 1: BFS
4242

43-
The approach is the same as in [102. Binary Tree Level Order Traversal](/solution/0100-0199/0102.Binary%20Tree%20Level%20Order%20Traversal/README_EN.md), just reverse the result in the end.
43+
The approach is the same as in [102. Binary Tree Level Order Traversal](https://github.com/doocs/leetcode/blob/main/solution/0100-0199/0102.Binary%20Tree%20Level%20Order%20Traversal/README_EN.md), just reverse the result in the end.
4444

4545
The time complexity is $O(n)$, and the space complexity is $O(n)$. Here, $n$ is the number of nodes in the binary tree.
4646

solution/0100-0199/0191.Number of 1 Bits/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ int hammingWeight(uint32_t n) {
190190
191191
`x -= (x & -x)` 可以消除二进制形式的最后一位 1。
192192
193-
同 [剑指 Offer 15. 二进制中 1 的个数](/lcof/面试题15.%20二进制中1的个数/README.md)
193+
同 [剑指 Offer 15. 二进制中 1 的个数](https://github.com/doocs/leetcode/blob/main/lcof/面试题15.%20二进制中1的个数/README.md)
194194
195195
<!-- tabs:start -->
196196

solution/0500-0599/0583.Delete Operation for Two Strings/README.md

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

4242
### 方法一:动态规划
4343

44-
类似[1143. 最长公共子序列](/solution/1100-1199/1143.Longest%20Common%20Subsequence/README.md)
44+
类似[1143. 最长公共子序列](https://github.com/doocs/leetcode/blob/main/solution/1100-1199/1143.Longest%20Common%20Subsequence/README.md)
4545

4646
定义 `dp[i][j]` 表示使得 `word1[0:i-1]``word1[0:j-1]` 两个字符串相同所需执行的删除操作次数。
4747

solution/0700-0799/0769.Max Chunks To Make Sorted/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ int maxChunksToSorted(int* arr, int arrSize) {
164164
165165
根据题目,我们可以发现,从左到右,每个分块都有一个最大值,并且这些分块的最大值呈单调递增。我们可以用一个栈来存储这些分块的最大值。最后得到的栈的大小,也就是题目所求的最多能完成排序的块。
166166
167-
以上这种解法,不仅可以解决本题,也可以解决 [768. 最多能完成排序的块 II](/solution/0700-0799/0768.Max%20Chunks%20To%20Make%20Sorted%20II/README.md) 这道困难题。大家可以自行尝试。
167+
以上这种解法,不仅可以解决本题,也可以解决 [768. 最多能完成排序的块 II](https://github.com/doocs/leetcode/blob/main/solution/0700-0799/0768.Max%20Chunks%20To%20Make%20Sorted%20II/README.md) 这道困难题。大家可以自行尝试。
168168
169169
时间复杂度 $O(n)$,空间复杂度 $O(n)$。其中 $n$ 为数组 $arr$ 的长度。
170170

solution/1600-1699/1618.Maximum Font to Fit a Sentence in a Screen/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ interface FontInfo {
8383

8484
时间复杂度 $O(m\log n)$。其中 $m$, $n$ 为文本 `text` 的长度以及字体大小 `fonts` 个数。
8585

86-
关于二分查找,见[整数二分算法模板 2](/basic/searching/BinarySearch/README.md)
86+
关于二分查找,见[整数二分算法模板 2](https://github.com/doocs/leetcode/blob/main/basic/searching/BinarySearch/README.md)
8787

8888
<!-- tabs:start -->
8989

solution/1600-1699/1632.Rank Transform of a Matrix/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ matrix[1][1] 的秩为 3 ,因为 matrix[1][1] > matrix[0][1], matrix[1][1] >
7474

7575
### 方法一:排序 + 并查集
7676

77-
我们先考虑简化情形:没有相同的元素。那么显然最小的元素的秩为 $1$,第二小的元素则要考虑是否和最小元素同行或同列。于是得到贪心解法:从小到大遍历元素,并维护每行、每列的最大秩,该元素的秩即为同行、同列的最大秩加 $1$。见题目:[2371. 最小化网格中的最大值](/solution/2300-2399/2371.Minimize%20Maximum%20Value%20in%20a%20Grid/README.md)
77+
我们先考虑简化情形:没有相同的元素。那么显然最小的元素的秩为 $1$,第二小的元素则要考虑是否和最小元素同行或同列。于是得到贪心解法:从小到大遍历元素,并维护每行、每列的最大秩,该元素的秩即为同行、同列的最大秩加 $1$。见题目:[2371. 最小化网格中的最大值](https://github.com/doocs/leetcode/blob/main/solution/2300-2399/2371.Minimize%20Maximum%20Value%20in%20a%20Grid/README.md)
7878

7979
存在相同元素时则较为复杂,假设两个相同元素同行(或同列),那么就要考虑到两个元素分别对应的行(或列)的最大秩。同时还可能出现联动,比如元素 `a``b` 同行,`b``c` 同列,那么要同时考虑这三个元素。
8080

solution/1700-1799/1713.Minimum Operations to Make a Subsequence/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@
4545

4646
根据题意,`target``arr` 这两个数组的公共子序列越长,需要添加的元素就越少。因此,最少添加的元素个数等于 `target` 的长度减去 `target``arr` 的最长公共子序列的长度。
4747

48-
但是,[求最长公共子序列](/solution/1100-1199/1143.Longest%20Common%20Subsequence/README.md)的时间复杂度为 $O(mn)$,无法通过本题,需要转变思路。
48+
但是,[求最长公共子序列](https://github.com/doocs/leetcode/blob/main/solution/1100-1199/1143.Longest%20Common%20Subsequence/README.md)的时间复杂度为 $O(mn)$,无法通过本题,需要转变思路。
4949

5050
我们可以用一个哈希表记录 `target` 数组中每个元素的下标,然后遍历 `arr` 数组,对于 `arr` 数组中的每个元素,如果哈希表中存在该元素,则将该元素的下标加入到一个数组中,这样就得到了一个新的数组 `nums`,该数组是 `arr` 中的元素在 `target` 数组中的下标(去掉了不在 `target` 中的元素),该数组的最长递增子序列的长度就是 `target``arr` 的最长公共子序列的长度。
5151

52-
因此,问题转化为求 `nums` 数组的最长递增子序列的长度。参考 [300. 最长递增子序列](/solution/0300-0399/0300.Longest%20Increasing%20Subsequence/README.md)
52+
因此,问题转化为求 `nums` 数组的最长递增子序列的长度。参考 [300. 最长递增子序列](https://github.com/doocs/leetcode/blob/main/solution/0300-0399/0300.Longest%20Increasing%20Subsequence/README.md)
5353

5454
时间复杂度 $O(n\log n)$,其中 $n$ 为 `arr` 数组的长度。
5555

solution/1700-1799/1723.Find Minimum Time to Finish All Jobs/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545

4646
### 方法一:DFS + 剪枝
4747

48-
本题与 [2305. 公平分发饼干](/solution/2300-2399/2305.Fair%20Distribution%20of%20Cookies/README.md) 基本一致,不同的地方仅在于 $k$ 值的大小。
48+
本题与 [2305. 公平分发饼干](https://github.com/doocs/leetcode/blob/main/solution/2300-2399/2305.Fair%20Distribution%20of%20Cookies/README.md) 基本一致,不同的地方仅在于 $k$ 值的大小。
4949

5050
剪枝优化:优化分配花费时间较大的工作,因此可以先对 $jobs$ 按照降序排列。
5151

solution/2000-2099/2024.Maximize the Confusion of an Exam/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262

6363
### 方法一:滑动窗口
6464

65-
思路同 [1004. 最大连续 1 的个数 III](/solution/1000-1099/1004.Max%20Consecutive%20Ones%20III/README.md)
65+
思路同 [1004. 最大连续 1 的个数 III](https://github.com/doocs/leetcode/blob/main/solution/1000-1099/1004.Max%20Consecutive%20Ones%20III/README.md)
6666

6767
维护一个单调变长的窗口。这种窗口经常出现在寻求“最大窗口”的问题中:因为要求的是“最大”,所以我们没有必要缩短窗口,于是代码就少了缩短窗口的部分;从另一个角度讲,本题里的 K 是资源数,一旦透支,窗口就不能再增长了。
6868

0 commit comments

Comments
 (0)