diff --git a/solution/0500-0599/0570.Managers with at Least 5 Direct Reports/README.md b/solution/0500-0599/0570.Managers with at Least 5 Direct Reports/README.md index 9e124c0fa471d..cdc9d52debeb3 100644 --- a/solution/0500-0599/0570.Managers with at Least 5 Direct Reports/README.md +++ b/solution/0500-0599/0570.Managers with at Least 5 Direct Reports/README.md @@ -17,15 +17,15 @@ | department | varchar | | managerId | int | +-------------+---------+ -在 SQL 中,id 是该表的主键列。 -该表的每一行都表示雇员的名字、他们的部门和他们的经理的id。 +id 是此表的主键(具有唯一值的列)。 +该表的每一行表示雇员的名字、他们的部门和他们的经理的id。 如果managerId为空,则该员工没有经理。 没有员工会成为自己的管理者。
-
查询至少有5名直接下属的经理 。
+编写一个解决方案,找出至少有五个直接下属的经理。
以 任意顺序 返回结果表。
@@ -41,7 +41,7 @@ Employee 表: +-----+-------+------------+-----------+ | id | name | department | managerId | +-----+-------+------------+-----------+ -| 101 | John | A | None | +| 101 | John | A | Null | | 102 | Dan | A | 101 | | 103 | James | A | 101 | | 104 | Amy | A | 101 | diff --git a/solution/0500-0599/0570.Managers with at Least 5 Direct Reports/README_EN.md b/solution/0500-0599/0570.Managers with at Least 5 Direct Reports/README_EN.md index d04e4aec04ae0..23cd07e5f4fa0 100644 --- a/solution/0500-0599/0570.Managers with at Least 5 Direct Reports/README_EN.md +++ b/solution/0500-0599/0570.Managers with at Least 5 Direct Reports/README_EN.md @@ -38,7 +38,7 @@ Employee table: +-----+-------+------------+-----------+ | id | name | department | managerId | +-----+-------+------------+-----------+ -| 101 | John | A | None | +| 101 | John | A | null | | 102 | Dan | A | 101 | | 103 | James | A | 101 | | 104 | Amy | A | 101 | diff --git a/solution/0700-0799/0700.Search in a Binary Search Tree/README.md b/solution/0700-0799/0700.Search in a Binary Search Tree/README.md index cadd3eba9c477..daeb1340c0767 100644 --- a/solution/0700-0799/0700.Search in a Binary Search Tree/README.md +++ b/solution/0700-0799/0700.Search in a Binary Search Tree/README.md @@ -33,7 +33,7 @@提示:
[1, 5000]
范围内[1, 5000]
范围内1 <= Node.val <= 107
root
是二叉搜索树1 <= val <= 107
+
Constraints:
diff --git a/solution/1200-1299/1293.Shortest Path in a Grid with Obstacles Elimination/README.md b/solution/1200-1299/1293.Shortest Path in a Grid with Obstacles Elimination/README.md index 5d713b2f29cd4..446a667f40759 100644 --- a/solution/1200-1299/1293.Shortest Path in a Grid with Obstacles Elimination/README.md +++ b/solution/1200-1299/1293.Shortest Path in a Grid with Obstacles Elimination/README.md @@ -14,7 +14,7 @@示例 1:
-输入: grid = [[0,0,0],[1,1,0],[0,0,0],[0,1,1],[0,0,0]], k = 1 @@ -26,7 +26,7 @@示例 2:
-+
输入:grid = [[0,1,1],[1,1,1],[1,0,0]], k = 1 diff --git a/solution/1200-1299/1293.Shortest Path in a Grid with Obstacles Elimination/images/1700710701-uPqkZe-img_v3_025f_0edd50fb-8a70-4a42-add0-f602caaad35g.jpg b/solution/1200-1299/1293.Shortest Path in a Grid with Obstacles Elimination/images/1700710701-uPqkZe-img_v3_025f_0edd50fb-8a70-4a42-add0-f602caaad35g.jpg new file mode 100644 index 0000000000000..9c53d098ec85c Binary files /dev/null and b/solution/1200-1299/1293.Shortest Path in a Grid with Obstacles Elimination/images/1700710701-uPqkZe-img_v3_025f_0edd50fb-8a70-4a42-add0-f602caaad35g.jpg differ diff --git a/solution/1200-1299/1293.Shortest Path in a Grid with Obstacles Elimination/images/1700710956-kcxqcC-img_v3_025f_d55a658c-8f40-464b-800f-22ccd27cc9fg.jpg b/solution/1200-1299/1293.Shortest Path in a Grid with Obstacles Elimination/images/1700710956-kcxqcC-img_v3_025f_d55a658c-8f40-464b-800f-22ccd27cc9fg.jpg new file mode 100644 index 0000000000000..0d10aadef6182 Binary files /dev/null and b/solution/1200-1299/1293.Shortest Path in a Grid with Obstacles Elimination/images/1700710956-kcxqcC-img_v3_025f_d55a658c-8f40-464b-800f-22ccd27cc9fg.jpg differ diff --git a/solution/1700-1799/1759.Count Number of Homogenous Substrings/README.md b/solution/1700-1799/1759.Count Number of Homogenous Substrings/README.md index ee22ec6f355dc..2ff1acd90832b 100644 --- a/solution/1700-1799/1759.Count Number of Homogenous Substrings/README.md +++ b/solution/1700-1799/1759.Count Number of Homogenous Substrings/README.md @@ -49,7 +49,7 @@
1 <= s.length <= 105
s
由小写字符串组成s
由小写字符串组成。arr
so it becomes [1,100,1000]
.
2. Decrease the value of the second element to 2.
3. Decrease the value of the third element to 3.
-Now arr = [1,2,3], which
satisfies the conditions.
+Now arr = [1,2,3]
, which
satisfies the conditions.
The largest element in arr is 3.
diff --git a/solution/2900-2999/2936.Number of Equal Numbers Blocks/README.md b/solution/2900-2999/2936.Number of Equal Numbers Blocks/README.md
index 7b9839afaea9d..df1fff58ee10b 100644
--- a/solution/2900-2999/2936.Number of Equal Numbers Blocks/README.md
+++ b/solution/2900-2999/2936.Number of Equal Numbers Blocks/README.md
@@ -1,4 +1,4 @@
-# [2936. Number of Equal Numbers Blocks](https://leetcode.cn/problems/number-of-equal-numbers-blocks)
+# [2936. 包含相等值数字块的数量](https://leetcode.cn/problems/number-of-equal-numbers-blocks)
[English Version](/solution/2900-2999/2936.Number%20of%20Equal%20Numbers%20Blocks/README_EN.md)
@@ -6,61 +6,63 @@
-You are given a 0-indexed array of integers, nums
. The following property holds for nums
:
给定一个整数数组 nums
,其 下标从 0 开始。对于 nums
,有以下性质:
i < j
such that nums[i] == nums[j]
, then for every index k
that i < k < j
, nums[k] == nums[i]
.i < j
,使得 nums[i] == nums[j]
,那么对于所有下标 k
,满足 i < k < j
,都有 nums[k] == nums[i]
。Since nums
is a very large array, you are given an instance of the class BigArray
which has the following functions:
由于 nums
是一个非常大的数组,这里提供了一个 BigArray
类的实例,该实例具有以下函数:
int at(long long index)
: Returns the value of nums[i]
.void size()
: Returns nums.length
.int at(long long index)
: 返回 nums[i]
的值。void size()
: 返回 nums.length
。Let's partition the array into maximal blocks such that each block contains equal values. Return the number of these blocks.
+让我们把数组分成 最大 的块,使得每个块包含 相等的值。返回这些块的数量。
-Note that if you want to test your solution using a custom test, behavior for tests with nums.length > 10
is undefined.
请注意,如果要使用自定义测试测试解决方案,对于 nums.length > 10
的测试行为是未定义的。
-
Example 1:
+ +示例 1:
-Input: nums = [3,3,3,3,3] -Output: 1 -Explanation: There is only one block here which is the whole array (because all numbers are equal) and that is: [3,3,3,3,3]. So the answer would be 1. +输入:nums = [3,3,3,3,3] +输出:1 +解释:这里只有一个块,即整个数组(因为所有数字都相等),即:[3,3,3,3,3]。因此答案是 1。-
Example 2:
+示例 2:
-Input: nums = [1,1,1,3,9,9,9,2,10,10] -Output: 5 -Explanation: There are 5 blocks here: -Block number 1: [1,1,1,3,9,9,9,2,10,10] -Block number 2: [1,1,1,3,9,9,9,2,10,10] -Block number 3: [1,1,1,3,9,9,9,2,10,10] -Block number 4: [1,1,1,3,9,9,9,2,10,10] -Block number 5: [1,1,1,3,9,9,9,2,10,10] -So the answer would be 5.- -
Example 3:
+输入:nums = [1,1,1,3,9,9,9,2,10,10] +输出:5 +解释:这里有 5 个块: +块号 1: [1,1,1,3,9,9,9,2,10,10] +块号 2: [1,1,1,3,9,9,9,2,10,10] +块号 3: [1,1,1,3,9,9,9,2,10,10] +块号 4: [1,1,1,3,9,9,9,2,10,10] +块号 5: [1,1,1,3,9,9,9,2,10,10] +因此答案是 5。 + +示例 3:
-Input: nums = [1,2,3,4,5,6,7] -Output: 7 -Explanation: Since all numbers are distinct, there are 7 blocks here and each element representing one block. So the answer would be 7. +输入:nums = [1,2,3,4,5,6,7] +输出:7 +解释:由于所有数字都是不同的,这里有 7 个块,每个元素代表一个块。因此答案是 7。
-
Constraints:
+ +提示:
1 <= nums.length <= 1015
1 <= nums[i] <= 109
nums
is at most 1015
.nums
的所有元素之和最多为 1015
。