Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2d7c1e4

Browse files
feat: update lc problems (doocs#3381)
1 parent 20e15cd commit 2d7c1e4

File tree

37 files changed

+283
-162
lines changed

37 files changed

+283
-162
lines changed

‎solution/0000-0099/0010.Regular Expression Matching/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ tags:
2525
<li><code>'*'</code> 匹配零个或多个前面的那一个元素</li>
2626
</ul>
2727

28-
<p>所谓匹配,是要涵盖&nbsp;<strong>整个&nbsp;</strong>字符串&nbsp;<code>s</code>的,而不是部分字符串。</p>
28+
<p>所谓匹配,是要涵盖&nbsp;<strong>整个&nbsp;</strong>字符串&nbsp;<code>s</code>的,而不是部分字符串。</p>
2929
&nbsp;
3030

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

‎solution/0000-0099/0075.Sort Colors/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>给定一个包含红色、白色和蓝色、共&nbsp;<code>n</code><em> </em>个元素的数组<meta charset="UTF-8" />&nbsp;<code>nums</code>&nbsp;,<strong><a href="https://baike.baidu.com/item/%E5%8E%9F%E5%9C%B0%E7%AE%97%E6%B3%95" target="_blank">原地</a></strong>对它们进行排序,使得相同颜色的元素相邻,并按照红色、白色、蓝色顺序排列。</p>
21+
<p>给定一个包含红色、白色和蓝色、共&nbsp;<code>n</code><em> </em>个元素的数组<meta charset="UTF-8" />&nbsp;<code>nums</code>&nbsp;,<strong><a href="https://baike.baidu.com/item/%E5%8E%9F%E5%9C%B0%E7%AE%97%E6%B3%95" target="_blank">原地</a>&nbsp;</strong>对它们进行排序,使得相同颜色的元素相邻,并按照红色、白色、蓝色顺序排列。</p>
2222

2323
<p>我们使用整数 <code>0</code>、&nbsp;<code>1</code> 和 <code>2</code> 分别表示红色、白色和蓝色。</p>
2424

‎solution/0000-0099/0085.Maximal Rectangle/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ tags:
2525
<p>&nbsp;</p>
2626

2727
<p><strong>示例 1:</strong></p>
28-
<img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/0000-0099/0085.Maximal%20Rectangle/images/maximal.jpg" style="width: 402px; height: 322px;" />
28+
<img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/0000-0099/0085.Maximal%20Rectangle/images/1722912576-boIxpm-image.png" style="width: 402px; height: 322px;" />
2929
<pre>
3030
<strong>输入:</strong>matrix = [["1","0","1","0","0"],["1","0","1","1","1"],["1","1","1","1","1"],["1","0","0","1","0"]]
3131
<strong>输出:</strong>6
15.3 KB
Loading[フレーム]

‎solution/0200-0299/0277.Find the Celebrity/README.md‎

Lines changed: 25 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -18,62 +18,56 @@ tags:
1818

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

21-
<p>假设你是一个专业的狗仔,参加了一个<code>n</code>人派对,其中每个人被从<code>0</code><code>n - 1</code>标号。在这个派对人群当中可能存在一位"名人"。所谓 "名人" 的定义是:其他所有<code>n - 1</code>个人都认识他/她,而他/她并不认识其他任何人。</p>
21+
<p>假设你是一个专业的狗仔,参加了一个&nbsp;<code>n</code>&nbsp;人派对,其中每个人被从&nbsp;<code>0</code>&nbsp;&nbsp;<code>n - 1</code>&nbsp;标号。在这个派对人群当中可能存在一位&nbsp;"名人"。所谓 "名人" 的定义是:其他所有&nbsp;<code>n - 1</code>&nbsp;个人都认识他/她,而他/她并不认识其他任何人。</p>
2222

23-
<p>现在你想要确认这个 "名人" 是谁,或者确定这里没有"名人"。而你唯一能做的就是问诸如 "A你好呀,请问你认不认识B呀?"的问题,以确定 A 是否认识 B。你需要在(渐近意义上)尽可能少的问题内来确定这位 "名人" 是谁(或者确定这里没有 "名人")。</p>
23+
<p>现在你想要确认这个 "名人" 是谁,或者确定这里没有&nbsp;"名人"。而你唯一能做的就是问诸如 "A&nbsp;你好呀,请问你认不认识&nbsp;B呀?"&nbsp;的问题,以确定 A 是否认识 B。你需要在(渐近意义上)尽可能少的问题内来确定这位 "名人" 是谁(或者确定这里没有 "名人")。</p>
2424

25-
<p>在本题中,你可以使用辅助函数<code>bool knows(a, b)</code>获取到 A是否认识 B。请你来实现一个函数<code>int findCelebrity(n)</code>。</p>
25+
<p>在本题中,你可以使用辅助函数&nbsp;<code>bool knows(a, b)</code>&nbsp;获取到 A&nbsp;是否认识 B。请你来实现一个函数&nbsp;<code>int findCelebrity(n)</code>。</p>
2626

27-
<p>派对最多只会有一个 "名人" 参加。若"名人" 存在,请返回他/她的编号;若"名人"不存在,请返回<code>-1</code>。</p>
27+
<p>派对最多只会有一个 "名人" 参加。若&nbsp;"名人" 存在,请返回他/她的编号;若&nbsp;"名人"&nbsp;不存在,请返回&nbsp;<code>-1</code>。</p>
2828

29-
<p> </p>
30-
31-
<p><strong>示例 1:</strong></p>
32-
33-
<p><img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/0200-0299/0277.Find%20the%20Celebrity/images/277_example_1_bold.png" style="height: 181px; width: 186px;" /></p>
29+
<p>&nbsp;</p>
3430

31+
<p><strong class="example">示例 1:</strong></p>
32+
<img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/0200-0299/0277.Find%20the%20Celebrity/images/g1.jpg" style="width: 224px; height: 145px;" />
3533
<pre>
36-
<strong>输入: </strong>graph = [
37-
[1,1,0],
38-
[0,1,0],
39-
[1,1,1]
40-
]
34+
<strong>输入: </strong>graph = [[1,1,0],[0,1,0],[1,1,1]]
4135
<strong>输出: </strong>1
4236
<strong>解释: </strong>有编号分别为 0、1 和 2 的三个人。graph[i][j] = 1 代表编号为 i 的人认识编号为 j 的人,而 graph[i][j] = 0 则代表编号为 i 的人不认识编号为 j 的人。"名人" 是编号 1 的人,因为 0 和 2 均认识他/她,但 1 不认识任何人。
4337
</pre>
38+
<strong> </strong>
4439

45-
<p><strong>示例 2:</strong></p>
46-
47-
<p><img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/0200-0299/0277.Find%20the%20Celebrity/images/277_example_2.png" style="height: 192px; width: 193px;" /></p>
48-
40+
<p><strong><strong class="example">示例&nbsp;2:</strong></strong></p>
41+
<img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/0200-0299/0277.Find%20the%20Celebrity/images/g2.jpg" style="width: 224px; height: 145px;" />
4942
<pre>
50-
<strong>输入: </strong>graph = [
51-
[1,0,1],
52-
[1,1,0],
53-
[0,1,1]
54-
]
43+
<strong>输入: </strong>graph = [[1,0,1],[1,1,0],[0,1,1]]
5544
<strong>输出: </strong>-1
5645
<strong>解释: </strong>没有 "名人"
5746
</pre>
5847

59-
<p> </p>
48+
<p><strong>&nbsp;</strong></p>
49+
<strong> </strong>
6050

61-
<p><strong>提示:</strong></p>
51+
<p><strong><strong>提示:</strong></strong></p>
52+
<strong> </strong>
6253

6354
<ul>
64-
<li><code>n == graph.length</code></li>
65-
<li><code>n == graph[i].length</code></li>
66-
<li><code>2 <= n <= 100</code></li>
67-
<li><code>graph[i][j]</code> 是 <code>0</code> 或 <code>1</code>.</li>
55+
<li><code>n == graph.length == graph[i].length</code></li>
56+
<li><code>2 &lt;= n &lt;= 100</code></li>
57+
<li><code>graph[i][j]</code> 是 <code>0</code> 或 <code>1</code></li>
6858
<li><code>graph[i][i] == 1</code></li>
6959
</ul>
60+
<strong> </strong>
7061

71-
<p> </p>
62+
<p><strong>&nbsp;</strong></p>
63+
<strong> </strong>
7264

73-
<p><strong>进阶:</strong>如果允许调用 API <code>knows</code> 的最大次数为 <code>3 * n</code> ,你可以设计一个不超过最大调用次数的解决方案吗?</p>
65+
<p><strong><strong>进阶:</strong></strong>如果允许调用 API <code>knows</code> 的最大次数为 <code>3 * n</code> ,你可以设计一个不超过最大调用次数的解决方案吗?</p>
66+
<strong> </strong>
7467

7568
<ol>
7669
</ol>
70+
<strong> </strong>
7771

7872
<!-- description:end -->
7973

-6.21 KB
Binary file not shown.
-6.33 KB
Binary file not shown.

‎solution/0500-0599/0588.Design In-Memory File System/README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ tags:
77
- 字典树
88
- 哈希表
99
- 字符串
10+
- 排序
1011
---
1112

1213
<!-- problem:start -->

‎solution/0500-0599/0588.Design In-Memory File System/README_EN.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ tags:
77
- Trie
88
- Hash Table
99
- String
10+
- Sorting
1011
---
1112

1213
<!-- problem:start -->

‎solution/0600-0699/0642.Design Search Autocomplete System/README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ comments: true
33
difficulty: 困难
44
edit_url: https://github.com/doocs/leetcode/edit/main/solution/0600-0699/0642.Design%20Search%20Autocomplete%20System/README.md
55
tags:
6+
- 深度优先搜索
67
- 设计
78
- 字典树
89
- 字符串

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /