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 511780a

Browse files
authored
chore: update lc problems (doocs#1922)
1 parent 6c1565a commit 511780a

File tree

21 files changed

+87
-83
lines changed

21 files changed

+87
-83
lines changed

‎solution/0200-0299/0264.Ugly Number II/README.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
<p>给你一个整数 <code>n</code> ,请你找出并返回第 <code>n</code> 个 <strong>丑数</strong> 。</p>
1010

11-
<p><strong>丑数 </strong>就是只包含质因数 <code>2</code>、<code>3</code> 和/或 <code>5</code>的正整数。</p>
11+
<p><strong>丑数 </strong>就是质因子只包含&nbsp;<code>2</code>、<code>3</code> 和&nbsp;<code>5</code>&nbsp;的正整数。</p>
1212

13-
<p></p>
13+
<p>&nbsp;</p>
1414

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

@@ -28,12 +28,12 @@
2828
<strong>解释:</strong>1 通常被视为丑数。
2929
</pre>
3030

31-
<p></p>
31+
<p>&nbsp;</p>
3232

3333
<p><strong>提示:</strong></p>
3434

3535
<ul>
36-
<li><code>1 <= n <= 1690</code></li>
36+
<li><code>1 &lt;= n &lt;= 1690</code></li>
3737
</ul>
3838

3939
## 解法

‎solution/0200-0299/0275.H-Index II/README.md‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<p>给你一个整数数组 <code>citations</code> ,其中 <code>citations[i]</code> 表示研究者的第 <code>i</code> 篇论文被引用的次数,<code>citations</code> 已经按照&nbsp;<strong>升序排列&nbsp;</strong>。计算并返回该研究者的 h<strong><em>&nbsp;</em></strong>指数。</p>
1010

11-
<p><a href="https://baike.baidu.com/item/h-index/3991452?fr=aladdin" target="_blank">h 指数的定义</a>:h 代表"高引用次数"(high citations),一名科研人员的 <code>h</code> 指数是指他(她)的 (<code>n</code> 篇论文中)<strong>总共</strong>有 <code>h</code> 篇论文分别被引用了<strong>至少</strong> <code>h</code> 次。</p>
11+
<p><a href="https://baike.baidu.com/item/h-index/3991452?fr=aladdin" target="_blank">h 指数的定义</a>:h 代表"高引用次数"(high citations),一名科研人员的 <code>h</code> 指数是指他(她)的 (<code>n</code> 篇论文中)<strong>至少&nbsp;</strong>有 <code>h</code> 篇论文分别被引用了<strong>至少</strong> <code>h</code> 次。</p>
1212

1313
<p>请你设计并实现对数时间复杂度的算法解决此问题。</p>
1414

@@ -17,16 +17,16 @@
1717
<p><strong class="example">示例 1:</strong></p>
1818

1919
<pre>
20-
<strong>输入<code>:</code></strong><code>citations = [0,1,3,5,6]</code>
21-
<strong>输出:</strong>3
22-
<strong>解释:</strong>给定数组表示研究者总共有 <code>5</code> 篇论文,每篇论文相应的被引用了 0<code>, 1, 3, 5, 6</code> 次。
23-
&nbsp; 由于研究者有<code>3</code>篇论文每篇<strong> 至少 </strong>被引用了 <code>3</code> 次,其余两篇论文每篇被引用<strong> 不多于</strong> <code>3</code> 次,所以她的<em> h </em>指数是 <code>3</code> 。</pre>
20+
<strong>输入:</strong><code>citations = [0,1,3,5,6]</code>
21+
<strong>输出:</strong><code>3</code>
22+
<strong>解释:</strong>给定数组表示研究者总共有 <code>5</code> 篇论文,每篇论文相应的被引用了 <code>0, 1, 3, 5, 6</code> 次。
23+
&nbsp; 由于研究者有<code>3</code>篇论文每篇<strong> 至少 </strong>被引用了 <code>3</code> 次,其余两篇论文每篇被引用<strong> 不多于</strong> <code>3</code> 次,所以她的<em> h </em>指数是 <code>3</code> 。</pre>
2424

2525
<p><strong class="example">示例 2:</strong></p>
2626

2727
<pre>
28-
<strong>输入:</strong>citations = [1,2,100]
29-
<strong>输出:</strong>2
28+
<strong>输入:</strong><code>citations = [1,2,100]</code>
29+
<strong>输出:</strong><code>2</code>
3030
</pre>
3131

3232
<p>&nbsp;</p>

‎solution/0400-0499/0484.Find Permutation/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<p>由范围 <code>[1,n]</code> 内所有整数组成的 <code>n</code> 个整数的排列&nbsp;<code>perm</code>&nbsp;可以表示为长度为 <code>n - 1</code> 的字符串 <code>s</code> ,其中:</p>
1010

1111
<ul>
12-
<li>如果 <code>perm[i] &lt; perm[i + 1]</code> ,那么 <code>s[i] == ' i '</code></li>
12+
<li>如果 <code>perm[i] &lt; perm[i + 1]</code> ,那么 <code>s[i] == 'I'</code></li>
1313
<li>如果&nbsp;<code>perm[i] &gt; perm[i + 1]</code>&nbsp;,那么 <code>s[i] == 'D'</code>&nbsp;。</li>
1414
</ul>
1515

‎solution/0600-0699/0603.Consecutive Available Seats/README.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
| seat_id | int |
1616
| free | bool |
1717
+-------------+------+
18-
在 SQL 中,Seat_id 是该表的自动递增主键列。
18+
Seat_id 是该表的自动递增主键列。
19+
在 PostgreSQL 中,<code>free</code> 存储为整数。请使用 <code>::boolean</code> 将其转换为布尔格式。
1920
该表的每一行表示第 i 个座位是否空闲。1 表示空闲,0 表示被占用。</pre>
2021

2122
<p>&nbsp;</p>

‎solution/0600-0699/0603.Consecutive Available Seats/README_EN.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
| seat_id | int |
1414
| free | bool |
1515
+-------------+------+
16-
In SQL, seat_id is an auto-increment primary key column for this table.
16+
seat_id is an auto-increment column for this table.
1717
Each row of this table indicates whether the i<sup>th</sup> seat is free or not. 1 means free while 0 means occupied.
1818
</pre>
1919

‎solution/1100-1199/1159.Market Analysis II/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ item_id 是该表的主键(具有唯一值的列)。
5151

5252
<p>&nbsp;</p>
5353

54-
<p>编写一个解决方案,查找每个用户的加入日期和作为买家在 <code>2019</code> 年下的订单数。</p>
54+
<p>编写一个解决方案,查找每个用户的加入日期和他们作为买家在 <code>2019</code> 年下的订单数。</p>
5555

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

‎solution/1200-1299/1220.Count Vowels Permutation/README_EN.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
<li>Each vowel&nbsp;<code>&#39;e&#39;</code> may only be followed by an <code>&#39;a&#39;</code>&nbsp;or an <code>&#39;i&#39;</code>.</li>
1313
<li>Each vowel&nbsp;<code>&#39;i&#39;</code> <strong>may not</strong> be followed by another <code>&#39;i&#39;</code>.</li>
1414
<li>Each vowel&nbsp;<code>&#39;o&#39;</code> may only be followed by an <code>&#39;i&#39;</code> or a&nbsp;<code>&#39;u&#39;</code>.</li>
15-
<li>Each vowel&nbsp;<code>&#39;u&#39;</code> may only be followed by an <code>&#39;a&#39;.</code></li>
15+
<li>Each vowel&nbsp;<code>&#39;u&#39;</code> may only be followed by an <code>&#39;a&#39;</code>.</li>
1616
</ul>
1717

18-
<p>Since the answer&nbsp;may be too large,&nbsp;return it modulo<code>10^9 + 7.</code></p>
18+
<p>Since the answer&nbsp;may be too large,&nbsp;return it modulo&nbsp;<code>10^9 + 7</code>.</p>
1919

2020
<p>&nbsp;</p>
2121
<p><strong class="example">Example 1:</strong></p>

‎solution/1900-1999/1965.Employees With Missing Information/README.md‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
| name | varchar |
1717
+-------------+---------+
1818
employee_id 是该表中具有唯一值的列。
19-
每一行表示雇员的id 和他的姓名。
19+
每一行表示雇员的 id 和他的姓名。
2020
</pre>
2121

2222
<p>表: <code>Salaries</code></p>
@@ -28,8 +28,8 @@ employee_id 是该表中具有唯一值的列。
2828
| employee_id | int |
2929
| salary | int |
3030
+-------------+---------+
31-
employee_id is 是该表中具有唯一值的列。
32-
每一行表示雇员的id 和他的薪水。
31+
employee_id 是该表中具有唯一值的列。
32+
每一行表示雇员的 id 和他的薪水。
3333
</pre>
3434

3535
<p>&nbsp;</p>
@@ -38,10 +38,10 @@ employee_id is 是该表中具有唯一值的列。
3838

3939
<ul>
4040
<li>雇员的 <strong>姓名</strong> 丢失了,或者</li>
41-
<li>雇员的 <strong>薪水信息</strong> 丢失了,或者</li>
41+
<li>雇员的 <strong>薪水信息</strong> 丢失了</li>
4242
</ul>
4343

44-
<p>返回这些雇员的id &nbsp;<code>employee_id</code>&nbsp;,&nbsp;<strong>从小到大排序&nbsp;</strong>。</p>
44+
<p>返回这些雇员的 id &nbsp;<code>employee_id</code>&nbsp;,&nbsp;<strong>从小到大排序&nbsp;</strong>。</p>
4545

4646
<p>查询结果格式如下面的例子所示。</p>
4747

@@ -75,9 +75,9 @@ Salaries table:
7575
| 2 |
7676
+-------------+
7777
<strong>解释:</strong>
78-
雇员1,2,4,5 都工作在这个公司
79-
1号雇员的姓名丢失了
80-
2号雇员的薪水信息丢失了。</pre>
78+
雇员 1,2,4,5 都在这个公司工作
79+
1 号雇员的姓名丢失了
80+
2 号雇员的薪水信息丢失了。</pre>
8181

8282
## 解法
8383

‎solution/2100-2199/2127.Maximum Employees to Be Invited to a Meeting/README.md‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@
1616

1717
<p><strong>示例 1:</strong></p>
1818

19-
<p><img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/2100-2199/2127.Maximum%20Employees%20to%20Be%20Invited%20to%20a%20Meeting/images/ex1.png" style="width: 236px; height: 195px;"></p>
19+
<p><img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/2100-2199/2127.Maximum%20Employees%20to%20Be%20Invited%20to%20a%20Meeting/images/ex1.png" style="width: 236px; height: 195px;" /></p>
2020

21-
<pre><b>输入:</b>favorite = [2,2,1,2]
21+
<pre>
22+
<b>输入:</b>favorite = [2,2,1,2]
2223
<b>输出:</b>3
2324
<strong>解释:</strong>
2425
上图展示了公司邀请员工 0,1 和 2 参加会议以及他们在圆桌上的座位。
@@ -29,7 +30,8 @@
2930

3031
<p><strong>示例 2:</strong></p>
3132

32-
<pre><b>输入:</b>favorite = [1,2,0]
33+
<pre>
34+
<b>输入:</b>favorite = [1,2,0]
3335
<b>输出:</b>3
3436
<b>解释:</b>
3537
每个员工都至少是另一个员工喜欢的员工。所以公司邀请他们所有人参加会议的前提是所有人都参加了会议。
@@ -42,13 +44,14 @@
4244

4345
<p><strong>示例 3:</strong></p>
4446

45-
<p><img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/2100-2199/2127.Maximum%20Employees%20to%20Be%20Invited%20to%20a%20Meeting/images/ex2.png" style="width: 219px; height: 220px;"></p>
47+
<p><img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/2100-2199/2127.Maximum%20Employees%20to%20Be%20Invited%20to%20a%20Meeting/images/ex2.png" style="width: 219px; height: 220px;" /></p>
4648

47-
<pre><b>输入:</b>favorite = [3,0,1,4,1]
49+
<pre>
50+
<b>输入:</b>favorite = [3,0,1,4,1]
4851
<b>输出:</b>4
4952
<b>解释:</b>
5053
上图展示了公司可以邀请员工 0,1,3 和 4 参加会议以及他们在圆桌上的座位。
51-
员工 2 无法参加,因为他喜欢的员工 0 旁边的座位已经被占领了。
54+
员工 2 无法参加,因为他喜欢的员工 1 旁边的座位已经被占领了。
5255
所以公司只能不邀请员工 2 。
5356
参加会议的最多员工数目为 4 。
5457
</pre>

‎solution/2100-2199/2171.Removing Minimum Number of Magic Beans/README_EN.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@
1414
<p><strong class="example">Example 1:</strong></p>
1515

1616
<pre>
17-
<strong>Input:</strong> beans = [4,<u><strong>1</strong></u>,6,5]
17+
<strong>Input:</strong> beans = [4,1,6,5]
1818
<strong>Output:</strong> 4
1919
<strong>Explanation:</strong>
2020
- We remove 1 bean from the bag with only 1 bean.
21-
This results in the remaining bags: [4,<b><u>0</u></b>,6,5]
21+
This results in the remaining bags: [4,<strong><u>0</u></strong>,6,5]
2222
- Then we remove 2 beans from the bag with 6 beans.
2323
This results in the remaining bags: [4,0,<strong><u>4</u></strong>,5]
2424
- Then we remove 1 bean from the bag with 5 beans.
25-
This results in the remaining bags: [4,0,4,<b><u>4</u></b>]
25+
This results in the remaining bags: [4,0,4,<strong><u>4</u></strong>]
2626
We removed a total of 1 + 2 + 1 = 4 beans to make the remaining non-empty bags have an equal number of beans.
2727
There are no other solutions that remove 4 beans or fewer.
2828
</pre>
2929

3030
<p><strong class="example">Example 2:</strong></p>
3131

3232
<pre>
33-
<strong>Input:</strong> beans = [<strong><u>2</u></strong>,10,<u><strong>3</strong></u>,<strong><u>2</u></strong>]
33+
<strong>Input:</strong> beans = [2,10,3,2]
3434
<strong>Output:</strong> 7
3535
<strong>Explanation:</strong>
3636
- We remove 2 beans from one of the bags with 2 beans.

0 commit comments

Comments
(0)

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