Skip to content

Commit b243a20

Browse files
authored
feat: update lc problems (doocs#2008)
1 parent 9480261 commit b243a20

File tree

14 files changed

+57
-53
lines changed

14 files changed

+57
-53
lines changed

solution/0500-0599/0570.Managers with at Least 5 Direct Reports/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@
1717
| department | varchar |
1818
| managerId | int |
1919
+-------------+---------+
20-
在 SQL 中,id 是该表的主键列
21-
该表的每一行都表示雇员的名字、他们的部门和他们的经理的id。
20+
id 是此表的主键(具有唯一值的列)
21+
该表的每一行表示雇员的名字、他们的部门和他们的经理的id。
2222
如果managerId为空,则该员工没有经理。
2323
没有员工会成为自己的管理者。
2424
</pre>
2525

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

28-
<p>查询<strong>至少有5名直接下属</strong>的经理<strong> </strong>。</p>
28+
<p>编写一个解决方案,找出至少有<strong>五个直接下属</strong>的经理。</p>
2929

3030
<p>以 <strong>任意顺序 </strong>返回结果表。</p>
3131

@@ -41,7 +41,7 @@ Employee 表:
4141
+-----+-------+------------+-----------+
4242
| id | name | department | managerId |
4343
+-----+-------+------------+-----------+
44-
| 101 | John | A | None |
44+
| 101 | John | A | Null |
4545
| 102 | Dan | A | 101 |
4646
| 103 | James | A | 101 |
4747
| 104 | Amy | A | 101 |

solution/0500-0599/0570.Managers with at Least 5 Direct Reports/README_EN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Employee table:
3838
+-----+-------+------------+-----------+
3939
| id | name | department | managerId |
4040
+-----+-------+------------+-----------+
41-
| 101 | John | A | None |
41+
| 101 | John | A | null |
4242
| 102 | Dan | A | 101 |
4343
| 103 | James | A | 101 |
4444
| 104 | Amy | A | 101 |

solution/0700-0799/0700.Search in a Binary Search Tree/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<p><strong>提示:</strong></p>
3434

3535
<ul>
36-
<li>数中节点数在&nbsp;<code>[1, 5000]</code>&nbsp;范围内</li>
36+
<li>树中节点数在&nbsp;<code>[1, 5000]</code>&nbsp;范围内</li>
3737
<li><code>1 &lt;= Node.val &lt;= 10<sup>7</sup></code></li>
3838
<li><code>root</code>&nbsp;是二叉搜索树</li>
3939
<li><code>1 &lt;= val &lt;= 10<sup>7</sup></code></li>

solution/0800-0899/0815.Bus Routes/README_EN.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
<strong>Output:</strong> -1
3131
</pre>
3232

33+
<p>&nbsp;</p>
34+
3335
<p>&nbsp;</p>
3436
<p><strong>Constraints:</strong></p>
3537

solution/1200-1299/1293.Shortest Path in a Grid with Obstacles Elimination/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
<p><strong>示例 1:</strong></p>
1616

17-
<p><img src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/1200-1299/1293.Shortest%20Path%20in%20a%20Grid%20with%20Obstacles%20Elimination/images/short1-grid.jpg" /></p>
17+
<p><img src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/1200-1299/1293.Shortest%20Path%20in%20a%20Grid%20with%20Obstacles%20Elimination/images/1700710956-kcxqcC-img_v3_025f_d55a658c-8f40-464b-800f-22ccd27cc9fg.jpg" style="width: 243px; height: 404px;" /></p>
1818

1919
<pre>
2020
<strong>输入:</strong> grid = [[0,0,0],[1,1,0],[0,0,0],[0,1,1],[0,0,0]], k = 1
@@ -26,7 +26,7 @@
2626

2727
<p><strong>示例 2:</strong></p>
2828

29-
<p><img src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/1200-1299/1293.Shortest%20Path%20in%20a%20Grid%20with%20Obstacles%20Elimination/images/short2-grid.jpg" /></p>
29+
<p><img src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/1200-1299/1293.Shortest%20Path%20in%20a%20Grid%20with%20Obstacles%20Elimination/images/1700710701-uPqkZe-img_v3_025f_0edd50fb-8a70-4a42-add0-f602caaad35g.jpg" style="width: 243px; height: 244px;" /></p>
3030

3131
<pre>
3232
<strong>输入:</strong>grid = [[0,1,1],[1,1,1],[1,0,0]], k = 1

solution/1700-1799/1759.Count Number of Homogenous Substrings/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
<ul>
5151
<li><code>1 &lt;= s.length &lt;= 10<sup>5</sup></code></li>
52-
<li><code>s</code> 由小写字符串组成</li>
52+
<li><code>s</code> 由小写字符串组成</li>
5353
</ul>
5454

5555
## 解法

solution/1800-1899/1846.Maximum Element After Decreasing and Rearranging/README_EN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ One possible way to satisfy the conditions is by doing the following:
4141
1. Rearrange <code>arr</code> so it becomes <code>[1,100,1000]</code>.
4242
2. Decrease the value of the second element to 2.
4343
3. Decrease the value of the third element to 3.
44-
Now <code>arr = [1,2,3], which </code>satisfies the conditions.
44+
Now <code>arr = [1,2,3]</code>, which<code> </code>satisfies the conditions.
4545
The largest element in <code>arr is 3.</code>
4646
</pre>
4747

solution/2900-2999/2936.Number of Equal Numbers Blocks/README.md

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,68 @@
1-
# [2936. Number of Equal Numbers Blocks](https://leetcode.cn/problems/number-of-equal-numbers-blocks)
1+
# [2936. 包含相等值数字块的数量](https://leetcode.cn/problems/number-of-equal-numbers-blocks)
22

33
[English Version](/solution/2900-2999/2936.Number%20of%20Equal%20Numbers%20Blocks/README_EN.md)
44

55
## 题目描述
66

77
<!-- 这里写题目描述 -->
88

9-
<p>You are given a <strong>0-indexed</strong> array of integers, <code>nums</code>. The following property holds for <code>nums</code>:</p>
9+
<p>给定一个整数数组 <code>nums</code>,其&nbsp;<strong>下标从 0 开始</strong>。对于 <code>nums</code>,有以下性质:</p>
1010

1111
<ul>
12-
<li>All occurrences of a value are adjacent. In other words, if there are two indices <code>i &lt; j</code> such that <code>nums[i] == nums[j]</code>, then for every index <code>k</code> that <code>i &lt; k &lt; j</code>, <code>nums[k] == nums[i]</code>.</li>
12+
<li>所有相同值的元素都是相邻的。换句话说,如果存在两个下标 <code>i &lt; j</code>,使得 <code>nums[i] == nums[j]</code>,那么对于所有下标 <code>k</code>,满足 <code>i &lt; k &lt; j</code>,都有 <code>nums[k] == nums[i]</code></li>
1313
</ul>
1414

15-
<p>Since <code>nums</code> is a very large array, you are given an instance of the class <code>BigArray</code> which has the following functions:</p>
15+
<p>由于 <code>nums</code> 是一个非常大的数组,这里提供了一个 <code>BigArray</code> 类的实例,该实例具有以下函数:</p>
1616

1717
<ul>
18-
<li><code>int at(long long index)</code>: Returns the value of <code>nums[i]</code>.</li>
19-
<li><code>void size()</code>: Returns <code>nums.length</code>.</li>
18+
<li><code>int at(long long index)</code>: 返回 <code>nums[i]</code> 的值。</li>
19+
<li><code>void size()</code>: 返回 <code>nums.length</code></li>
2020
</ul>
2121

22-
<p>Let&#39;s partition the array into <strong>maximal</strong> blocks such that each block contains <strong>equal values</strong>. Return<em> the number of these blocks.</em></p>
22+
<p>让我们把数组分成 <strong>最大</strong>&nbsp;的块,使得每个块包含 <strong>相等的值</strong>。返回这些块的数量。</p>
2323

24-
<p><strong>Note</strong> that if you want to test your solution using a custom test, behavior for tests with <code>nums.length &gt; 10</code> is undefined.</p>
24+
<p><strong>请注意</strong>,如果要使用自定义测试测试解决方案,对于 <code>nums.length &gt; 10</code> 的测试行为是未定义的。</p>
2525

2626
<p>&nbsp;</p>
27-
<p><strong class="example">Example 1:</strong></p>
27+
28+
<p><strong>示例 1:</strong></p>
2829

2930
<pre>
30-
<strong>Input:</strong> nums = [3,3,3,3,3]
31-
<strong>Output:</strong> 1
32-
<strong>Explanation:</strong> There is only one block here which is the whole array (because all numbers are equal) and that is: [<u>3,3,3,3,3</u>]. So the answer would be 1.
31+
<b>输入:</b>nums = [3,3,3,3,3]
32+
<b>输出:</b>1
33+
<b>解释:</b>这里只有一个块,即整个数组(因为所有数字都相等),即:[3,3,3,3,3]。因此答案是 1。
3334
</pre>
3435

35-
<p><strong class="example">Example 2:</strong></p>
36+
<p><b>示例 2:</b></p>
3637

3738
<pre>
38-
<strong>Input:</strong> nums = [1,1,1,3,9,9,9,2,10,10]
39-
<strong>Output:</strong> 5
40-
<strong>Explanation:</strong> There are 5 blocks here:
41-
Block number 1: [<u>1,1,1</u>,3,9,9,9,2,10,10]
42-
Block number 2: [1,1,1,<u>3</u>,9,9,9,2,10,10]
43-
Block number 3: [1,1,1,3,<u>9,9,9</u>,2,10,10]
44-
Block number 4: [1,1,1,3,9,9,9,<u>2</u>,10,10]
45-
Block number 5: [1,1,1,3,9,9,9,2,<u>10,10</u>]
46-
So the answer would be 5.</pre>
47-
48-
<p><strong class="example">Example 3:</strong></p>
39+
<b>输入:</b>nums = [1,1,1,3,9,9,9,2,10,10]
40+
<b>输出:</b>5
41+
<b>解释:</b>这里有 5 个块:
42+
块号 1: [<u>1,1,1</u>,3,9,9,9,2,10,10]
43+
块号 2: [1,1,1,<u>3</u>,9,9,9,2,10,10]
44+
块号 3: [1,1,1,3,<u>9,9,9</u>,2,10,10]
45+
块号 4: [1,1,1,3,9,9,9,<u>2</u>,10,10]
46+
块号 5: [1,1,1,3,9,9,9,2,<u>10,10</u>]
47+
因此答案是 5。</pre>
48+
49+
<p><strong class="example">示例 3:</strong></p>
4950

5051
<pre>
51-
<strong>Input:</strong> nums = [1,2,3,4,5,6,7]
52-
<strong>Output:</strong> 7
53-
<strong>Explanation:</strong> Since all numbers are distinct, there are 7 blocks here and each element representing one block. So the answer would be 7.
52+
<b>输入:</b>nums = [1,2,3,4,5,6,7]
53+
<b>输出:</b>7
54+
<b>解释:</b>由于所有数字都是不同的,这里有 7 个块,每个元素代表一个块。因此答案是 7。
5455
</pre>
5556

5657
<p>&nbsp;</p>
57-
<p><strong>Constraints:</strong></p>
58+
59+
<p><strong>提示:</strong></p>
5860

5961
<ul>
6062
<li><code>1 &lt;= nums.length &lt;= 10<sup>15</sup></code></li>
6163
<li><code>1 &lt;= nums[i] &lt;= 10<sup>9</sup></code></li>
62-
<li>The input is generated such that all equal values are adjacent.</li>
63-
<li>The sum of the elements of&nbsp;<code>nums</code>&nbsp;is at most&nbsp;<code>10<sup>15</sup></code>.</li>
64+
<li>在生成的输入中所有相同值的元素是相邻的。</li>
65+
<li><code>nums</code> 的所有元素之和最多为<meta charset="UTF-8" />&nbsp;<code>10<sup>15</sup></code></li>
6466
</ul>
6567

6668
## 解法

0 commit comments

Comments
 (0)