diff --git a/solution/0400-0499/0489.Robot Room Cleaner/README.md b/solution/0400-0499/0489.Robot Room Cleaner/README.md index 21fd350602fde..afdb3c6ad6527 100644 --- a/solution/0400-0499/0489.Robot Room Cleaner/README.md +++ b/solution/0400-0499/0489.Robot Room Cleaner/README.md @@ -21,7 +21,7 @@ tags:

机器人从一个未知的空单元格开始出发,并且你无法访问网格,但你可以使用给定的 API Robot 控制机器人。

-

你的任务是使用机器人清扫整个房间(即清理房间中的每个空单元格)。机器人具有四个给定的API,可以前进、向左转或向右转。每次转弯 90 度。

+

你的任务是使用机器人清扫整个房间(即清理房间中的每个空单元格)。机器人具有四个给定的API,可以前进、向左转或向右转。每次转弯 90 度。

当机器人试图移动到一个存在障碍物的单元格时,它的碰撞传感器会检测到障碍物,并停留在当前单元格。

diff --git a/solution/1000-1099/1095.Find in Mountain Array/README.md b/solution/1000-1099/1095.Find in Mountain Array/README.md index 0ddd4e54bd093..9e07e971f3b13 100644 --- a/solution/1000-1099/1095.Find in Mountain Array/README.md +++ b/solution/1000-1099/1095.Find in Mountain Array/README.md @@ -22,39 +22,28 @@ tags:

(这是一个 交互式问题 

-

给你一个 山脉数组 mountainArr,请你返回能够使得 mountainArr.get(index) 等于 target 最小 的下标 index 值。

- -

如果不存在这样的下标 index,就请返回 -1

- -

 

- -

何为山脉数组?如果数组 A 是一个山脉数组的话,那它满足如下条件:

- -

首先A.length >= 3

- -

其次,在 0 < i < A.length - 1 条件下,存在 i 使得:

+

你可以将一个数组 arr 称为 山脉数组 当且仅当:

-

 

+

给定一个山脉数组 mountainArr ,返回 最小 的 index 使得 mountainArr.get(index) == target。如果不存在这样的 index,返回 -1 。

-

你将 不能直接访问该山脉数组,必须通过 MountainArray 接口来获取数据:

+

你无法直接访问山脉数组。你只能使用 MountainArray 接口来访问数组:

-

 

- -

注意:

- -

对 MountainArray.get 发起超过 100 次调用的提交将被视为错误答案。此外,任何试图规避判题系统的解决方案都将会导致比赛资格被取消。

- -

为了帮助大家更好地理解交互式问题,我们准备了一个样例 “答案”:https://leetcode.cn/playground/RKhe3ave,请注意这 不是一个正确答案

+

调用 MountainArray.get 超过 100 次的提交会被判定为错误答案。此外,任何试图绕过在线评测的解决方案都将导致取消资格。

@@ -63,13 +52,15 @@ tags:

示例 1:

-
输入:array = [1,2,3,4,5,3,1], target = 3
+
+输入:array = [1,2,3,4,5,3,1], target = 3
 输出:2
 解释:3 在数组中出现了两次,下标分别为 2 和 5,我们返回最小的下标 2。

示例 2:

-
输入:array = [0,1,2,4,2,1], target = 3
+
+输入:array = [0,1,2,4,2,1], target = 3
 输出:-1
 解释:3 在数组中没有出现,返回 -1。
 
@@ -79,9 +70,9 @@ tags:

提示:

diff --git a/solution/1200-1299/1236.Web Crawler/README.md b/solution/1200-1299/1236.Web Crawler/README.md index b05b868429e4b..45784a53ca3d2 100644 --- a/solution/1200-1299/1236.Web Crawler/README.md +++ b/solution/1200-1299/1236.Web Crawler/README.md @@ -19,7 +19,9 @@ tags: -

给定一个链接 startUrl 和一个接口 HtmlParser ,请你实现一个网络爬虫,以实现爬取同 startUrl 拥有相同 域名标签 的全部链接。该爬虫得到的全部链接可以 任何顺序 返回结果。

+

给定一个链接 startUrl 和一个接口 HtmlParser ,请你实现一个网络爬虫,以实现爬取同 startUrl 拥有相同 域名标签 的全部链接。

+ +

该爬虫得到的全部链接可以 任何顺序 返回结果。

你的网络爬虫应当按照如下模式工作:

@@ -32,7 +34,7 @@ tags:

-

如上所示的一个链接,其域名为 example.org。简单起见,你可以假设所有的链接都采用 http协议 并没有指定 端口。例如,链接 http://leetcode.com/problems 和 http://leetcode.com/contest 是同一个域名下的,而链接http://example.org/test 和 http://example.com/abc 是不在同一域名下的。

+

如上所示的一个链接,其域名为 example.org。简单起见,你可以假设所有的链接都采用 http协议 并没有指定 端口。例如,链接 http://leetcode.com/problems 和 http://leetcode.com/contest 是同一个域名下的,而链接 http://example.org/test 和 http://example.com/abc 是不在同一域名下的。

HtmlParser 接口定义如下: 

@@ -44,6 +46,8 @@ interface HtmlParser {

下面是两个实例,用以解释该问题的设计功能,对于自定义测试,你可以使用三个变量  urlsedges 和 startUrl。注意在代码实现中,你只可以访问 startUrl ,而 urls 和 edges 不可以在你的代码中被直接访问。

+

注意:将尾随斜线“/”的相同 URL 视为不同的 URL。例如,“http://news.yahoo.com” 和 “http://news.yahoo.com/” 是不同的域名。

+

 

示例 1:

diff --git a/solution/1400-1499/1428.Leftmost Column with at Least a One/README.md b/solution/1400-1499/1428.Leftmost Column with at Least a One/README.md index a26b7304c918e..13997b61d401b 100644 --- a/solution/1400-1499/1428.Leftmost Column with at Least a One/README.md +++ b/solution/1400-1499/1428.Leftmost Column with at Least a One/README.md @@ -19,11 +19,9 @@ tags: -

(这是一个交互题

+

行排序二进制矩阵 表示所有元素都是 01,并且矩阵的每一行都以非递减排序。

-

我们称只包含元素 0 或 1 的矩阵为二进制矩阵。矩阵中每个单独的行都按非递减顺序排序。

- -

给定一个这样的二进制矩阵,返回至少包含一个 1 的最左端列的索引(从 0 开始)。如果这样的列不存在,返回 -1

+

给定一个 行排序二进制矩阵 binaryMatrix,返回至少包含一个 1 的 最左端列 的索引(从 0 开始)。如果这样的列不存在,返回 -1

您不能直接访问该二进制矩阵。你只可以通过 BinaryMatrix 接口来访问。

@@ -62,15 +60,7 @@ tags:
 输入: mat = [[0,0],[0,0]]
-输出: -1
- -

示例 4:

- -

- -
-输入: mat = [[0,0,0,1],[0,0,1,1],[0,1,1,1]]
-输出: 1
+输出: -1
 

 

diff --git a/solution/1500-1599/1533.Find the Index of the Large Integer/README.md b/solution/1500-1599/1533.Find the Index of the Large Integer/README.md index cc9db70fc2426..733d4bb60c050 100644 --- a/solution/1500-1599/1533.Find the Index of the Large Integer/README.md +++ b/solution/1500-1599/1533.Find the Index of the Large Integer/README.md @@ -67,7 +67,7 @@ reader.compareSub(4, 4, 5, 5) // 返回 1。因此,可以确定 arr[4] 是数

提示:

diff --git a/solution/1500-1599/1538.Guess the Majority in a Hidden Array/README.md b/solution/1500-1599/1538.Guess the Majority in a Hidden Array/README.md index 07aba14af9b01..d7c99c0be9784 100644 --- a/solution/1500-1599/1538.Guess the Majority in a Hidden Array/README.md +++ b/solution/1500-1599/1538.Guess the Majority in a Hidden Array/README.md @@ -72,7 +72,7 @@ reader.query(4,5,6,7) // 返回 4,因为 nums[4], nums[5], nums[6], nums[7]

提示:

diff --git a/solution/1900-1999/1953.Maximum Number of Weeks for Which You Can Work/README.md b/solution/1900-1999/1953.Maximum Number of Weeks for Which You Can Work/README.md index 0c7cc52e77358..b2eb62fcac6ce 100644 --- a/solution/1900-1999/1953.Maximum Number of Weeks for Which You Can Work/README.md +++ b/solution/1900-1999/1953.Maximum Number of Weeks for Which You Can Work/README.md @@ -28,7 +28,7 @@ tags:
  • 连续的 两周中,你 不能 参与并完成同一个项目中的两个阶段任务。
  • -

    一旦所有项目中的全部阶段任务都完成,那么你将停止工作;如果选择任意剩余任务都会导致违反上述规则,那么你也会 停止工作。注意,由于这些条件的限制,你可能无法完成所有阶段任务。

    +

    一旦所有项目中的全部阶段任务都完成,或者执行仅剩的一个阶段任务将会导致你违反上面的规则,你将 停止工作。注意,由于这些条件的限制,你可能无法完成所有阶段任务。

    返回在不违反上面规则的情况下你 最多 能工作多少周。

    diff --git a/solution/2700-2799/2753.Count Houses in a Circular Street II/README.md b/solution/2700-2799/2753.Count Houses in a Circular Street II/README.md index a13de9ce1c317..e0835102ccfdb 100644 --- a/solution/2700-2799/2753.Count Houses in a Circular Street II/README.md +++ b/solution/2700-2799/2753.Count Houses in a Circular Street II/README.md @@ -14,7 +14,7 @@ edit_url: https://github.com/doocs/leetcode/edit/main/solution/2700-2799/2753.Co -

    给定一个代表 环形 街道的类 Street 和一个正整数 k,表示街道上房屋的最大数量(也就是说房屋数量不超过 k)。每个房屋的门初始时可以是开着的也可以是关着的(至少有一个房屋的门是开着的)。

    +

    给定一个代表 环形 街道的类 Street 的对象 street 和一个正整数 k,表示街道上房屋的最大数量(也就是说房屋数量不超过 k)。每个房屋的门初始时可以是开着的也可以是关着的(至少有一个房屋的门是开着的)。

    刚开始,你站在一座房子的门前。你的任务是计算街道上的房屋数量。