Skip to content

Commit 35d66aa

Browse files
authored
feat: update lc problems (doocs#3494)
1 parent e7d8237 commit 35d66aa

File tree

48 files changed

+1648
-84
lines changed

Some content is hidden

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

48 files changed

+1648
-84
lines changed

solution/0000-0099/0003.Longest Substring Without Repeating Characters/README.md

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

2727
<pre>
2828
<strong>输入: </strong>s = "abcabcbb"
29-
<strong>输出: </strong>3
29+
<strong>输出: </strong>3
3030
<strong>解释:</strong> 因为无重复字符的最长子串是 <code>"abc"</code>,所以其长度为 3。
3131
</pre>
3232

solution/0100-0199/0180.Consecutive Numbers/README_EN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ tags:
2626
| num | varchar |
2727
+-------------+---------+
2828
In SQL, id is the primary key for this table.
29-
id is an autoincrement column.
29+
id is an autoincrement column starting from 1.
3030
</pre>
3131

3232
<p>&nbsp;</p>

solution/0300-0399/0303.Range Sum Query - Immutable/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ tags:
4545
<strong>解释:</strong>
4646
NumArray numArray = new NumArray([-2, 0, 3, -5, 2, -1]);
4747
numArray.sumRange(0, 2); // return 1 ((-2) + 0 + 3)
48-
numArray.sumRange(2, 5); // return -1 (3 + (-5) + 2 + (-1))
48+
numArray.sumRange(2, 5); // return -1 (3 + (-5) + 2 + (-1))
4949
numArray.sumRange(0, 5); // return -3 ((-2) + 0 + 3 + (-5) + 2 + (-1))
5050
</pre>
5151

solution/0300-0399/0304.Range Sum Query 2D - Immutable/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ tags:
3939
<p><img src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/0300-0399/0304.Range%20Sum%20Query%202D%20-%20Immutable/images/1626332422-wUpUHT-image.png" style="width: 200px;" /></p>
4040

4141
<pre>
42-
<strong>输入:</strong>
42+
<strong>输入:</strong>
4343
["NumMatrix","sumRegion","sumRegion","sumRegion"]
4444
[[[[3,0,1,4,2],[5,6,3,2,1],[1,2,0,1,5],[4,1,0,1,7],[1,0,3,0,5]]],[2,1,4,3],[1,1,2,2],[1,2,2,4]]
45-
<strong>输出:</strong>
45+
<strong>输出:</strong>
4646
[null, 8, 11, 12]
4747

4848
<strong>解释:</strong>

solution/0600-0699/0640.Solve the Equation/README_EN.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ tags:
5151
<li><code>3 &lt;= equation.length &lt;= 1000</code></li>
5252
<li><code>equation</code> has exactly one <code>&#39;=&#39;</code>.</li>
5353
<li><code>equation</code> consists of integers with an absolute value in the range <code>[0, 100]</code> without any leading zeros, and the variable <code>&#39;x&#39;</code>.</li>
54+
<li>The input is generated that if there is a single solution, it will be an integer.</li>
5455
</ul>
5556

5657
<!-- description:end -->

solution/0800-0899/0874.Walking Robot Simulation/README_EN.md

Lines changed: 58 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -18,67 +18,91 @@ tags:
1818

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

21-
<p>A robot on an infinite XY-plane starts at point <code>(0, 0)</code> facing north. The robot can receive a sequence of these three possible types of <code>commands</code>:</p>
21+
<p>A robot on an infinite XY-plane starts at point <code>(0, 0)</code> facing north. The robot receives an array of integers <code>commands</code>, which represents a sequence of moves that it needs to execute. There are only three possible types of instructions the robot can receive:</p>
2222

2323
<ul>
2424
<li><code>-2</code>: Turn left <code>90</code> degrees.</li>
2525
<li><code>-1</code>: Turn right <code>90</code> degrees.</li>
2626
<li><code>1 &lt;= k &lt;= 9</code>: Move forward <code>k</code> units, one unit at a time.</li>
2727
</ul>
2828

29-
<p>Some of the grid squares are <code>obstacles</code>. The <code>i<sup>th</sup></code> obstacle is at grid point <code>obstacles[i] = (x<sub>i</sub>, y<sub>i</sub>)</code>. If the robot runs into an obstacle, then it will instead stay in its current location and move on to the next command.</p>
29+
<p>Some of the grid squares are <code>obstacles</code>. The <code>i<sup>th</sup></code> obstacle is at grid point <code>obstacles[i] = (x<sub>i</sub>, y<sub>i</sub>)</code>. If the robot runs into an obstacle, it will stay in its current location (on the block adjacent to the obstacle) and move onto the next command.</p>
3030

31-
<p>Return <em>the <strong>maximum Euclidean distance</strong> that the robot ever gets from the origin <strong>squared</strong> (i.e. if the distance is </em><code>5</code><em>, return </em><code>25</code><em>)</em>.</p>
31+
<p>Return the <strong>maximum squared Euclidean distance</strong> that the robot reaches at any point in its path (i.e. if the distance is <code>5</code>, return <code>25</code>).</p>
3232

3333
<p><strong>Note:</strong></p>
3434

3535
<ul>
36+
<li>There can be an obstacle at <code>(0, 0)</code>. If this happens, the robot will ignore the obstacle until it has moved off the origin. However, it will be unable to return to <code>(0, 0)</code> due to the obstacle.</li>
3637
<li>North means +Y direction.</li>
3738
<li>East means +X direction.</li>
3839
<li>South means -Y direction.</li>
3940
<li>West means -X direction.</li>
40-
<li>There can be obstacle in&nbsp;[0,0].</li>
4141
</ul>
4242

4343
<p>&nbsp;</p>
4444
<p><strong class="example">Example 1:</strong></p>
4545

46-
<pre>
47-
<strong>Input:</strong> commands = [4,-1,3], obstacles = []
48-
<strong>Output:</strong> 25
49-
<strong>Explanation:</strong> The robot starts at (0, 0):
50-
1. Move north 4 units to (0, 4).
51-
2. Turn right.
52-
3. Move east 3 units to (3, 4).
53-
The furthest point the robot ever gets from the origin is (3, 4), which squared is 3<sup>2</sup> + 4<sup>2</sup> = 25 units away.
54-
</pre>
46+
<div class="example-block">
47+
<p><strong>Input:</strong> <span class="example-io">commands = [4,-1,3], obstacles = []</span></p>
48+
49+
<p><strong>Output:</strong> <span class="example-io">25</span></p>
50+
51+
<p><strong>Explanation: </strong></p>
52+
53+
<p>The robot starts at <code>(0, 0)</code>:</p>
54+
55+
<ol>
56+
<li>Move north 4 units to <code>(0, 4)</code>.</li>
57+
<li>Turn right.</li>
58+
<li>Move east 3 units to <code>(3, 4)</code>.</li>
59+
</ol>
60+
61+
<p>The furthest point the robot ever gets from the origin is <code>(3, 4)</code>, which squared is <code>3<sup>2</sup> + 4<sup>2 </sup>= 25</code> units away.</p>
62+
</div>
5563

5664
<p><strong class="example">Example 2:</strong></p>
5765

58-
<pre>
59-
<strong>Input:</strong> commands = [4,-1,4,-2,4], obstacles = [[2,4]]
60-
<strong>Output:</strong> 65
61-
<strong>Explanation:</strong> The robot starts at (0, 0):
62-
1. Move north 4 units to (0, 4).
63-
2. Turn right.
64-
3. Move east 1 unit and get blocked by the obstacle at (2, 4), robot is at (1, 4).
65-
4. Turn left.
66-
5. Move north 4 units to (1, 8).
67-
The furthest point the robot ever gets from the origin is (1, 8), which squared is 1<sup>2</sup> + 8<sup>2</sup> = 65 units away.
68-
</pre>
66+
<div class="example-block">
67+
<p><strong>Input:</strong> <span class="example-io">commands = [4,-1,4,-2,4], obstacles = [[2,4]]</span></p>
68+
69+
<p><strong>Output:</strong> <span class="example-io">65</span></p>
70+
71+
<p><strong>Explanation:</strong></p>
72+
73+
<p>The robot starts at <code>(0, 0)</code>:</p>
74+
75+
<ol>
76+
<li>Move north 4 units to <code>(0, 4)</code>.</li>
77+
<li>Turn right.</li>
78+
<li>Move east 1 unit and get blocked by the obstacle at <code>(2, 4)</code>, robot is at <code>(1, 4)</code>.</li>
79+
<li>Turn left.</li>
80+
<li>Move north 4 units to <code>(1, 8)</code>.</li>
81+
</ol>
82+
83+
<p>The furthest point the robot ever gets from the origin is <code>(1, 8)</code>, which squared is <code>1<sup>2</sup> + 8<sup>2</sup> = 65</code> units away.</p>
84+
</div>
6985

7086
<p><strong class="example">Example 3:</strong></p>
7187

72-
<pre>
73-
<strong>Input:</strong> commands = [6,-1,-1,6], obstacles = []
74-
<strong>Output:</strong> 36
75-
<strong>Explanation:</strong> The robot starts at (0, 0):
76-
1. Move north 6 units to (0, 6).
77-
2. Turn right.
78-
3. Turn right.
79-
4. Move south 6 units to (0, 0).
80-
The furthest point the robot ever gets from the origin is (0, 6), which squared is 6<sup>2</sup> = 36 units away.
81-
</pre>
88+
<div class="example-block">
89+
<p><strong>Input:</strong> <span class="example-io">commands = [6,-1,-1,6], obstacles = [[0,0]]</span></p>
90+
91+
<p><strong>Output:</strong> <span class="example-io">36</span></p>
92+
93+
<p><strong>Explanation:</strong></p>
94+
95+
<p>The robot starts at <code>(0, 0)</code>:</p>
96+
97+
<ol>
98+
<li>Move north 6 units to <code>(0, 6)</code>.</li>
99+
<li>Turn right.</li>
100+
<li>Turn right.</li>
101+
<li>Move south 5 units and get blocked by the obstacle at <code>(0,0)</code>, robot is at <code>(0, 1)</code>.</li>
102+
</ol>
103+
104+
<p>The furthest point the robot ever gets from the origin is <code>(0, 6)</code>, which squared is <code>6<sup>2</sup> = 36</code> units away.</p>
105+
</div>
82106

83107
<p>&nbsp;</p>
84108
<p><strong>Constraints:</strong></p>

solution/1200-1299/1204.Last Person to Fit in the Bus/README_EN.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ weight is the weight of the person in kilograms.
4040

4141
<p>Write a solution to find the <code>person_name</code> of the <strong>last person</strong> that can fit on the bus without exceeding the weight limit. The test cases are generated such that the first person does not exceed the weight limit.</p>
4242

43+
<p><strong>Note</strong> that <em>only one</em> person can board the bus at any given turn.</p>
44+
4345
<p>The&nbsp;result format is in the following example.</p>
4446

4547
<p>&nbsp;</p>

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

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23,25 +23,25 @@ tags:
2323

2424
<!-- description:start -->
2525

26-
<p>给你一个 <code>m x n</code> 的矩阵 <code>matrix</code> ,请你返回一个新的矩阵<em> </em><code>answer</code> ,其中<em> </em><code>answer[row][col]</code> 是 <code>matrix[row][col]</code> 的秩。</p>
26+
<p>给你一个&nbsp;<code>m x n</code>&nbsp;的矩阵 <code>matrix</code>&nbsp;,请你返回一个新的矩阵<em>&nbsp;</em><code>answer</code>&nbsp;,其中<em>&nbsp;</em><code>answer[row][col]</code>&nbsp;&nbsp;<code>matrix[row][col]</code>&nbsp;的秩。</p>
2727

28-
<p>每个元素的 <b>秩</b> 是一个整数,表示这个元素相对于其他元素的大小关系,它按照如下规则计算:</p>
28+
<p>每个元素的&nbsp;<b>秩</b>&nbsp;是一个整数,表示这个元素相对于其他元素的大小关系,它按照如下规则计算:</p>
2929

3030
<ul>
3131
<li>秩是从 1 开始的一个整数。</li>
32-
<li>如果两个元素 <code>p</code> 和 <code>q</code> 在 <strong>同一行</strong> 或者 <strong>同一列</strong> ,那么:
32+
<li>如果两个元素&nbsp;<code>p</code> 和&nbsp;<code>q</code>&nbsp;在 <strong>同一行</strong>&nbsp;或者 <strong>同一列</strong>&nbsp;,那么:
3333
<ul>
34-
<li>如果 <code>p < q</code> ,那么 <code>rank(p) < rank(q)</code></li>
35-
<li>如果 <code>p == q</code> ,那么 <code>rank(p) == rank(q)</code></li>
36-
<li>如果 <code>p > q</code> ,那么 <code>rank(p) > rank(q)</code></li>
34+
<li>如果&nbsp;<code>p &lt; q</code> ,那么&nbsp;<code>rank(p) &lt; rank(q)</code></li>
35+
<li>如果&nbsp;<code>p == q</code>&nbsp;,那么&nbsp;<code>rank(p) == rank(q)</code></li>
36+
<li>如果&nbsp;<code>p &gt; q</code>&nbsp;,那么&nbsp;<code>rank(p) &gt; rank(q)</code></li>
3737
</ul>
3838
</li>
39-
<li><b>秩</b> 需要越 <strong>小</strong> 越好。</li>
39+
<li><b>秩</b>&nbsp;需要越 <strong>小</strong>&nbsp;越好。</li>
4040
</ul>
4141

42-
<p>题目保证按照上面规则 <code>answer</code> 数组是唯一的。</p>
42+
<p>题目保证按照上面规则&nbsp;<code>answer</code>&nbsp;数组是唯一的。</p>
4343

44-
<p> </p>
44+
<p>&nbsp;</p>
4545

4646
<p><strong>示例 1:</strong></p>
4747
<img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/1600-1699/1632.Rank%20Transform%20of%20a%20Matrix/images/rank1.jpg" style="width: 442px; height: 162px;" />
@@ -50,9 +50,9 @@ tags:
5050
<b>输出:</b>[[1,2],[2,3]]
5151
<strong>解释:</strong>
5252
matrix[0][0] 的秩为 1 ,因为它是所在行和列的最小整数。
53-
matrix[0][1] 的秩为 2 ,因为 matrix[0][1] > matrix[0][0] 且 matrix[0][0] 的秩为 1 。
54-
matrix[1][0] 的秩为 2 ,因为 matrix[1][0] > matrix[0][0] 且 matrix[0][0] 的秩为 1 。
55-
matrix[1][1] 的秩为 3 ,因为 matrix[1][1] > matrix[0][1], matrix[1][1] > matrix[1][0] 且 matrix[0][1] 和 matrix[1][0] 的秩都为 2 。
53+
matrix[0][1] 的秩为 2 ,因为 matrix[0][1] &gt; matrix[0][0] 且 matrix[0][0] 的秩为 1 。
54+
matrix[1][0] 的秩为 2 ,因为 matrix[1][0] &gt; matrix[0][0] 且 matrix[0][0] 的秩为 1 。
55+
matrix[1][1] 的秩为 3 ,因为 matrix[1][1] &gt; matrix[0][1], matrix[1][1] &gt; matrix[1][0] 且 matrix[0][1] 和 matrix[1][0] 的秩都为 2 。
5656
</pre>
5757

5858
<p><strong>示例 2:</strong></p>
@@ -69,22 +69,17 @@ matrix[1][1] 的秩为 3 ,因为 matrix[1][1] > matrix[0][1], matrix[1][1] >
6969
<b>输出:</b>[[4,2,3],[1,3,4],[5,1,6],[1,3,4]]
7070
</pre>
7171

72-
<p><strong>示例 4:</strong></p>
73-
<img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/1600-1699/1632.Rank%20Transform%20of%20a%20Matrix/images/rank4.jpg" style="width: 601px; height: 242px;" />
74-
<pre>
75-
<b>输入:</b>matrix = [[7,3,6],[1,4,5],[9,8,2]]
76-
<b>输出:</b>[[5,1,4],[1,2,3],[6,3,1]]
77-
</pre>
72+
<p>&nbsp;</p>
7873

79-
<p> </p>
74+
<p>&nbsp;</p>
8075

8176
<p><strong>提示:</strong></p>
8277

8378
<ul>
8479
<li><code>m == matrix.length</code></li>
8580
<li><code>n == matrix[i].length</code></li>
86-
<li><code>1 <= m, n <= 500</code></li>
87-
<li><code>-10<sup>9</sup> <= matrix[row][col] <= 10<sup>9</sup></code></li>
81+
<li><code>1 &lt;= m, n &lt;= 500</code></li>
82+
<li><code>-10<sup>9</sup> &lt;= matrix[row][col] &lt;= 10<sup>9</sup></code></li>
8883
</ul>
8984

9085
<!-- description:end -->

solution/2100-2199/2132.Stamping the Grid/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ tags:
5151

5252
<p><img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/2100-2199/2132.Stamping%20the%20Grid/images/ex2.png" style="width: 170px; height: 179px;"></p>
5353

54-
<pre><b>输入:</b>grid = [[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]], stampHeight = 2, stampWidth = 2
55-
<b>输出:</b>false
54+
<pre><b>输入:</b>grid = [[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]], stampHeight = 2, stampWidth = 2
55+
<b>输出:</b>false
5656
<b>解释:</b>没办法放入邮票覆盖所有的空格子,且邮票不超出网格图以外。
5757
</pre>
5858

solution/2100-2199/2132.Stamping the Grid/README_EN.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ tags:
4848
<p><strong class="example">Example 2:</strong></p>
4949
<img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/2100-2199/2132.Stamping%20the%20Grid/images/ex2.png" style="width: 170px; height: 179px;" />
5050
<pre>
51-
<strong>Input:</strong> grid = [[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]], stampHeight = 2, stampWidth = 2
52-
<strong>Output:</strong> false
51+
<strong>Input:</strong> grid = [[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]], stampHeight = 2, stampWidth = 2
52+
<strong>Output:</strong> false
5353
<strong>Explanation:</strong> There is no way to fit the stamps onto all the empty cells without the stamps going outside the grid.
5454
</pre>
5555

solution/2400-2499/2470.Number of Subarrays With LCM Equal to K/README.md

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

1313
<!-- problem:start -->
1414

15-
# [2470. 最小公倍数为 K 的子数组数目](https://leetcode.cn/problems/number-of-subarrays-with-lcm-equal-to-k)
15+
# [2470. 最小公倍数等于 K 的子数组数目](https://leetcode.cn/problems/number-of-subarrays-with-lcm-equal-to-k)
1616

1717
[English Version](/solution/2400-2499/2470.Number%20of%20Subarrays%20With%20LCM%20Equal%20to%20K/README_EN.md)
1818

solution/2500-2599/2506.Count Pairs Of Similar Strings/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ tags:
4141
<strong>输入:</strong>words = ["aba","aabb","abcd","bac","aabc"]
4242
<strong>输出:</strong>2
4343
<strong>解释:</strong>共有 2 对满足条件:
44-
- i = 0 且 j = 1 :words[0] 和 words[1] 只由字符 'a' 和 'b' 组成。
45-
- i = 3 且 j = 4 :words[3] 和 words[4] 只由字符 'a'、'b' 和 'c' 。
44+
- i = 0 且 j = 1 :words[0] 和 words[1] 只由字符 'a' 和 'b' 组成。
45+
- i = 3 且 j = 4 :words[3] 和 words[4] 只由字符 'a'、'b' 和 'c' 。
4646
</pre>
4747

4848
<p><strong>示例 2:</strong></p>
@@ -51,9 +51,9 @@ tags:
5151
<strong>输入:</strong>words = ["aabb","ab","ba"]
5252
<strong>输出:</strong>3
5353
<strong>解释:</strong>共有 3 对满足条件:
54-
- i = 0 且 j = 1 :words[0] 和 words[1] 只由字符 'a' 和 'b' 组成。
55-
- i = 0 且 j = 2 :words[0] 和 words[2] 只由字符 'a' 和 'b' 组成。
56-
- i = 1 且 j = 2 :words[1] 和 words[2] 只由字符 'a' 和 'b' 组成。
54+
- i = 0 且 j = 1 :words[0] 和 words[1] 只由字符 'a' 和 'b' 组成。
55+
- i = 0 且 j = 2 :words[0] 和 words[2] 只由字符 'a' 和 'b' 组成。
56+
- i = 1 且 j = 2 :words[1] 和 words[2] 只由字符 'a' 和 'b' 组成。
5757
</pre>
5858

5959
<p><strong>示例 3:</strong></p>

solution/2500-2599/2506.Count Pairs Of Similar Strings/README_EN.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ tags:
4040
<strong>Input:</strong> words = [&quot;aba&quot;,&quot;aabb&quot;,&quot;abcd&quot;,&quot;bac&quot;,&quot;aabc&quot;]
4141
<strong>Output:</strong> 2
4242
<strong>Explanation:</strong> There are 2 pairs that satisfy the conditions:
43-
- i = 0 and j = 1 : both words[0] and words[1] only consist of characters &#39;a&#39; and &#39;b&#39;.
44-
- i = 3 and j = 4 : both words[3] and words[4] only consist of characters &#39;a&#39;, &#39;b&#39;, and &#39;c&#39;.
43+
- i = 0 and j = 1 : both words[0] and words[1] only consist of characters &#39;a&#39; and &#39;b&#39;.
44+
- i = 3 and j = 4 : both words[3] and words[4] only consist of characters &#39;a&#39;, &#39;b&#39;, and &#39;c&#39;.
4545
</pre>
4646

4747
<p><strong class="example">Example 2:</strong></p>
@@ -50,7 +50,7 @@ tags:
5050
<strong>Input:</strong> words = [&quot;aabb&quot;,&quot;ab&quot;,&quot;ba&quot;]
5151
<strong>Output:</strong> 3
5252
<strong>Explanation:</strong> There are 3 pairs that satisfy the conditions:
53-
- i = 0 and j = 1 : both words[0] and words[1] only consist of characters &#39;a&#39; and &#39;b&#39;.
53+
- i = 0 and j = 1 : both words[0] and words[1] only consist of characters &#39;a&#39; and &#39;b&#39;.
5454
- i = 0 and j = 2 : both words[0] and words[2] only consist of characters &#39;a&#39; and &#39;b&#39;.
5555
- i = 1 and j = 2 : both words[1] and words[2] only consist of characters &#39;a&#39; and &#39;b&#39;.
5656
</pre>

solution/2700-2799/2725.Interval Cancellation/README_EN.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ setTimeout(cancelFn, cancelTimeMs)
2626

2727
<p>The function <code>fn</code> should be called with <code>args</code> immediately and then called again every&nbsp;<code>t</code> milliseconds&nbsp;until&nbsp;<code>cancelFn</code>&nbsp;is called at <code>cancelTimeMs</code> ms.</p>
2828

29-
<p>&nbsp;</p>
30-
3129
<p>&nbsp;</p>
3230
<p><strong class="example">Example 1:</strong></p>
3331

solution/2700-2799/2750.Ways to Split Array Into Good Subarrays/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ source: 第 351 场周赛 Q3
77
tags:
88
- 数组
99
- 数学
10+
- 动态规划
1011
---
1112

1213
<!-- problem:start -->

solution/2700-2799/2750.Ways to Split Array Into Good Subarrays/README_EN.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ source: Weekly Contest 351 Q3
77
tags:
88
- Array
99
- Math
10+
- Dynamic Programming
1011
---
1112

1213
<!-- problem:start -->

solution/3100-3199/3176.Find the Maximum Length of a Good Subsequence I/README.md

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

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

23-
<p>给你一个整数数组&nbsp;<code>nums</code>&nbsp;和一个 <strong>非负</strong>&nbsp;整数&nbsp;<code>k</code>&nbsp;。如果一个整数序列&nbsp;<code>seq</code>&nbsp;满足在范围下标范围&nbsp;<code>[0, seq.length - 2]</code>&nbsp;中存在 <strong>不超过</strong>&nbsp;<code>k</code>&nbsp;个下标 <code>i</code>&nbsp;满足&nbsp;<code>seq[i] != seq[i + 1]</code>&nbsp;,那么我们称这个整数序列为&nbsp;<strong>好</strong>&nbsp;序列。</p>
23+
<p>给你一个整数数组&nbsp;<code>nums</code>&nbsp;和一个 <strong>非负</strong>&nbsp;整数&nbsp;<code>k</code>&nbsp;。如果一个整数序列&nbsp;<code>seq</code>&nbsp;满足在下标范围&nbsp;<code>[0, seq.length - 2]</code>&nbsp;&nbsp;<strong>最多只有</strong>&nbsp;<code>k</code>&nbsp;个下标 <code>i</code>&nbsp;满足&nbsp;<code>seq[i] != seq[i + 1]</code>&nbsp;,那么我们称这个整数序列为&nbsp;<strong>好</strong>&nbsp;序列。</p>
2424

25-
<p>请你返回 <code>nums</code>&nbsp;&nbsp;<strong>好</strong> <span data-keyword="subsequence-array">子序列</span>&nbsp;的最长长度</p>
25+
<p>请你返回 <code>nums</code>&nbsp;&nbsp;<strong>好</strong> <span data-keyword="subsequence-array">子序列</span>&nbsp;的最长长度</p>
2626

2727
<p>&nbsp;</p>
2828

@@ -35,7 +35,7 @@ tags:
3535

3636
<p><strong>解释:</strong></p>
3737

38-
<p>最长好子序列为&nbsp;<code>[<em><strong>1</strong></em>,<em><strong>2</strong></em>,<strong><em>1</em></strong>,<em><strong>1</strong></em>,3]</code>&nbsp;。</p>
38+
<p>最长好子序列为&nbsp;<code>[<u>1</u>,<u>2</u>,<u>1</u>,<u>1</u>,3]</code>&nbsp;。</p>
3939
</div>
4040

4141
<p><strong class="example">示例 2:</strong></p>
@@ -47,7 +47,7 @@ tags:
4747

4848
<p><strong>解释:</strong></p>
4949

50-
<p>最长好子序列为&nbsp;<code>[<strong><em>1</em></strong>,2,3,4,5,<strong><em>1</em></strong>]</code>&nbsp;。</p>
50+
<p>最长好子序列为&nbsp;<code>[<u>1</u>,2,3,4,5,<u>1</u>]</code>&nbsp;。</p>
5151
</div>
5252

5353
<p>&nbsp;</p>

0 commit comments

Comments
 (0)