Skip to content

Commit aba35fe

Browse files
authored
Merge branch 'main' into add-solution-to-lc-problem-3409
2 parents 54b09ae + bc8aa8f commit aba35fe

File tree

90 files changed

+2491
-163
lines changed

Some content is hidden

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

90 files changed

+2491
-163
lines changed

.github/workflows/deploy.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,18 @@ jobs:
100100
101101
echo "Cloning docs branch ..."
102102
git clone --depth 1 --branch docs "https://x-access-token:${GH_TOKEN}@github.com/${GH_REPO}.git" docs-cache
103-
cp "$CACHE_FILE" docs-cache/
104103
105104
cd docs-cache
105+
git checkout --orphan docs
106+
git rm -rf .
107+
cp "../$CACHE_FILE" ./
108+
106109
git config user.name github-actions[bot]
107110
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
108111
109112
git add .git-committers-cache.json
110113
git commit -m "chore: update committer cache [skip ci]" || echo "No changes to commit"
111-
git push origin docs
114+
git push --force origin docs
112115
113116
- name: Upload artifact
114117
uses: actions/upload-pages-artifact@v3

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@
66
*.iml
77
__pycache__
88
/node_modules
9-
/solution/result.json
109
/solution/__pycache__
1110
/solution/.env
1211
.cache
1312
!.cache/plugin/
1413
!.cache/plugin/git-committers/
15-
!.cache/plugin/git-committers/page-authors.json
14+
!.cache/plugin/git-committers/page-authors.json

solution/0000-0099/0045.Jump Game II/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ tags:
1818

1919
<!-- description:start -->
2020

21-
<p>给定一个长度为 <code>n</code> 的 <strong>0 索引</strong>整数数组 <code>nums</code>。初始位置为 <code>nums[0]</code>。</p>
21+
<p>给定一个长度为 <code>n</code> 的 <strong>0 索引</strong>整数数组 <code>nums</code>。初始位置在下标 0。</p>
2222

2323
<p>每个元素 <code>nums[i]</code> 表示从索引 <code>i</code> 向后跳转的最大长度。换句话说,如果你在索引&nbsp;<code>i</code>&nbsp;处,你可以跳转到任意 <code>(i + j)</code> 处:</p>
2424

solution/0000-0099/0056.Merge Intervals/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ tags:
3636
<strong>输出:</strong>[[1,5]]
3737
<strong>解释:</strong>区间 [1,4] 和 [4,5] 可被视为重叠区间。</pre>
3838

39+
<p><strong class="example">示例 3:</strong></p>
40+
41+
<pre>
42+
<b>输入:</b>intervals = [[4,7],[1,4]]
43+
<b>输出:</b>[[1,7]]
44+
<b>解释:</b>区间 [1,4] 和 [4,7] 可被视为重叠区间。
45+
</pre>
46+
3947
<p>&nbsp;</p>
4048

4149
<p><strong>提示:</strong></p>

solution/0000-0099/0056.Merge Intervals/README_EN.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ tags:
3636
<strong>Explanation:</strong> Intervals [1,4] and [4,5] are considered overlapping.
3737
</pre>
3838

39+
<p><strong class="example">Example 3:</strong></p>
40+
41+
<pre>
42+
<strong>Input:</strong> intervals = [[4,7],[1,4]]
43+
<strong>Output:</strong> [[1,7]]
44+
<strong>Explanation:</strong> Intervals [1,4] and [4,7] are considered overlapping.
45+
</pre>
46+
3947
<p>&nbsp;</p>
4048
<p><strong>Constraints:</strong></p>
4149

solution/0100-0199/0130.Surrounded Regions/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ tags:
3737
<p><strong class="example">示例 1:</strong></p>
3838

3939
<div class="example-block">
40-
<p><strong>输入:</strong><span class="example-io">board = [["X","X","X","X"],["X","O","O","X"],["X","X","O","X"],["X","O","X","X"]]</span></p>
40+
<p><strong>输入:</strong><span class="example-io">board = [['X','X','X','X'],['X','O','O','X'],['X','X','O','X'],['X','O','X','X']]</span></p>
4141

42-
<p><b>输出:</b><span class="example-io">[["X","X","X","X"],["X","X","X","X"],["X","X","X","X"],["X","O","X","X"]]</span></p>
42+
<p><b>输出:</b><span class="example-io">[['X','X','X','X'],['X','X','X','X'],['X','X','X','X'],['X','O','X','X']]</span></p>
4343

4444
<p><strong>解释:</strong></p>
4545
<img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/0100-0199/0130.Surrounded%20Regions/images/1718167191-XNjUTG-image.png" style="width: 367px; height: 158px;" />
@@ -49,9 +49,9 @@ tags:
4949
<p><strong class="example">示例 2:</strong></p>
5050

5151
<div class="example-block">
52-
<p><strong>输入:</strong><span class="example-io">board = [["X"]]</span></p>
52+
<p><strong>输入:</strong><span class="example-io">board = [['X']]</span></p>
5353

54-
<p><strong>输出:</strong><span class="example-io">[["X"]]</span></p>
54+
<p><strong>输出:</strong><span class="example-io">[['X']]</span></p>
5555
</div>
5656

5757
<p>&nbsp;</p>

solution/0200-0299/0200.Number of Islands/README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,22 @@ tags:
2020

2121
<!-- description:start -->
2222

23-
<p>给你一个由 <code>'1'</code>(陆地)和 <code>'0'</code>(水)组成的的二维网格,请你计算网格中岛屿的数量。</p>
23+
<p>给你一个由&nbsp;<code>'1'</code>(陆地)和 <code>'0'</code>(水)组成的的二维网格,请你计算网格中岛屿的数量。</p>
2424

2525
<p>岛屿总是被水包围,并且每座岛屿只能由水平方向和/或竖直方向上相邻的陆地连接形成。</p>
2626

2727
<p>此外,你可以假设该网格的四条边均被水包围。</p>
2828

29-
<p> </p>
29+
<p>&nbsp;</p>
3030

3131
<p><strong>示例 1:</strong></p>
3232

3333
<pre>
3434
<strong>输入:</strong>grid = [
35-
["1","1","1","1","0"],
36-
["1","1","0","1","0"],
37-
["1","1","0","0","0"],
38-
["0","0","0","0","0"]
35+
&nbsp; ['1','1','1','1','0'],
36+
&nbsp; ['1','1','0','1','0'],
37+
&nbsp; ['1','1','0','0','0'],
38+
&nbsp; ['0','0','0','0','0']
3939
]
4040
<strong>输出:</strong>1
4141
</pre>
@@ -44,22 +44,22 @@ tags:
4444

4545
<pre>
4646
<strong>输入:</strong>grid = [
47-
["1","1","0","0","0"],
48-
["1","1","0","0","0"],
49-
["0","0","1","0","0"],
50-
["0","0","0","1","1"]
47+
&nbsp; ['1','1','0','0','0'],
48+
&nbsp; ['1','1','0','0','0'],
49+
&nbsp; ['0','0','1','0','0'],
50+
&nbsp; ['0','0','0','1','1']
5151
]
5252
<strong>输出:</strong>3
5353
</pre>
5454

55-
<p> </p>
55+
<p>&nbsp;</p>
5656

5757
<p><strong>提示:</strong></p>
5858

5959
<ul>
6060
<li><code>m == grid.length</code></li>
6161
<li><code>n == grid[i].length</code></li>
62-
<li><code>1 <= m, n <= 300</code></li>
62+
<li><code>1 &lt;= m, n &lt;= 300</code></li>
6363
<li><code>grid[i][j]</code> 的值为 <code>'0'</code> 或 <code>'1'</code></li>
6464
</ul>
6565

solution/0200-0299/0223.Rectangle Area/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ tags:
4949
<p><strong>提示:</strong></p>
5050

5151
<ul>
52-
<li><code>-10<sup>4</sup> &lt;= ax1, ay1, ax2, ay2, bx1, by1, bx2, by2 &lt;= 10<sup>4</sup></code></li>
52+
<li><code>-10<sup>4</sup> &lt;= ax1 &lt;= ax2 &lt;= 10<sup>4</sup></code></li>
53+
<li><code>-10<sup>4</sup> &lt;= ay1 &lt;= ay2 &lt;= 10<sup>4</sup></code></li>
54+
<li><code>-10<sup>4</sup> &lt;= bx1 &lt;= bx2 &lt;= 10<sup>4</sup></code></li>
55+
<li><code>-10<sup>4</sup> &lt;= by1 &lt;= by2 &lt;= 10<sup>4</sup></code></li>
5356
</ul>
5457

5558
<!-- description:end -->

solution/0300-0399/0334.Increasing Triplet Subsequence/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ tags:
4343
<pre>
4444
<strong>输入:</strong>nums = [2,1,5,0,4,6]
4545
<strong>输出:</strong>true
46-
<strong>解释:</strong>三元组 (3, 4, 5) 满足题意,因为 nums[3] == 0 &lt; nums[4] == 4 &lt; nums[5] == 6
46+
<strong>解释:</strong>其中一个满足题意的三元组是 (3, 4, 5),因为 nums[3] == 0 &lt; nums[4] == 4 &lt; nums[5] == 6
4747
</pre>
4848

4949
<p>&nbsp;</p>

solution/0300-0399/0334.Increasing Triplet Subsequence/README_EN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ tags:
4141
<pre>
4242
<strong>Input:</strong> nums = [2,1,5,0,4,6]
4343
<strong>Output:</strong> true
44-
<strong>Explanation:</strong> The triplet (3, 4, 5) is valid because nums[3] == 0 &lt; nums[4] == 4 &lt; nums[5] == 6.
44+
<strong>Explanation:</strong> One of the valid triplet is (3, 4, 5), because nums[3] == 0 &lt; nums[4] == 4 &lt; nums[5] == 6.
4545
</pre>
4646

4747
<p>&nbsp;</p>

0 commit comments

Comments
 (0)