Skip to content

Commit 2657506

Browse files
committed
feat: update lc problems
1 parent 6cedebf commit 2657506

File tree

16 files changed

+45
-40
lines changed

16 files changed

+45
-40
lines changed

solution/0000-0099/0045.Jump Game II/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
<ul>
4343
<li><code>1 &lt;= nums.length &lt;= 10<sup>4</sup></code></li>
4444
<li><code>0 &lt;= nums[i] &lt;= 1000</code></li>
45+
<li>题目保证可以到达&nbsp;<code>nums[n-1]</code></li>
4546
</ul>
4647

4748
## 解法

solution/0100-0199/0191.Number of 1 Bits/README.md

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

99
<p>编写一个函数,输入是一个无符号整数(以二进制串的形式),返回其二进制表达式中数字位数为 '1' 的个数(也被称为<a href="https://baike.baidu.com/item/%E6%B1%89%E6%98%8E%E9%87%8D%E9%87%8F" target="_blank">汉明重量</a>)。</p>
1010

11-
<p> </p>
11+
<p>&nbsp;</p>
1212

1313
<p><strong>提示:</strong></p>
1414

1515
<ul>
1616
<li>请注意,在某些语言(如 Java)中,没有无符号整数类型。在这种情况下,输入和输出都将被指定为有符号整数类型,并且不应影响您的实现,因为无论整数是有符号的还是无符号的,其内部的二进制表示形式都是相同的。</li>
17-
<li>在 Java 中,编译器使用<a href="https://baike.baidu.com/item/二进制补码/5295284" target="_blank">二进制补码</a>记法来表示有符号整数。因此,在上面的 <strong>示例 3</strong> 中,输入表示有符号整数 <code>-3</code>。</li>
17+
<li>在 Java 中,编译器使用<a href="https://baike.baidu.com/item/二进制补码/5295284" target="_blank">二进制补码</a>记法来表示有符号整数。因此,在&nbsp;<strong>示例 3</strong>&nbsp;中,输入表示有符号整数 <code>-3</code>。</li>
1818
</ul>
1919

20-
<p> </p>
20+
<p>&nbsp;</p>
2121

2222
<p><strong>示例 1:</strong></p>
2323

2424
<pre>
25-
<strong>输入:</strong>00000000000000000000000000001011
25+
<strong>输入:</strong>n = 00000000000000000000000000001011
2626
<strong>输出:</strong>3
27-
<strong>解释:</strong>输入的二进制串 <code><strong>00000000000000000000000000001011</strong> 中,共有三位为 '1'。</code>
27+
<strong>解释:</strong>输入的二进制串 <code><strong>00000000000000000000000000001011</strong>&nbsp;中,共有三位为 '1'。</code>
2828
</pre>
2929

3030
<p><strong>示例 2:</strong></p>
3131

3232
<pre>
33-
<strong>输入:</strong>00000000000000000000000010000000
33+
<strong>输入:</strong>n = 00000000000000000000000010000000
3434
<strong>输出:</strong>1
35-
<strong>解释:</strong>输入的二进制串 <strong>00000000000000000000000010000000</strong> 中,共有一位为 '1'。
35+
<strong>解释:</strong>输入的二进制串 <strong>00000000000000000000000010000000</strong>&nbsp;中,共有一位为 '1'。
3636
</pre>
3737

3838
<p><strong>示例 3:</strong></p>
3939

4040
<pre>
41-
<strong>输入:</strong>11111111111111111111111111111101
41+
<strong>输入:</strong>n = 11111111111111111111111111111101
4242
<strong>输出:</strong>31
4343
<strong>解释:</strong>输入的二进制串 <strong>11111111111111111111111111111101</strong> 中,共有 31 位为 '1'。</pre>
4444

45-
<p> </p>
45+
<p>&nbsp;</p>
4646

4747
<p><strong>提示:</strong></p>
4848

@@ -53,7 +53,7 @@
5353
<ul>
5454
</ul>
5555

56-
<p> </p>
56+
<p>&nbsp;</p>
5757

5858
<p><strong>进阶</strong>:</p>
5959

solution/0200-0299/0245.Shortest Word Distance III/README_EN.md

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

55
## Description
66

7-
<p>Given an array of strings <code>wordsDict</code> and two strings that already exist in the array <code>word1</code> and <code>word2</code>, return <em>the shortest distance between these two words in the list</em>.</p>
7+
<p>Given an array of strings <code>wordsDict</code> and two strings that already exist in the array <code>word1</code> and <code>word2</code>, return <em>the shortest distance between the occurrence of these two words in the list</em>.</p>
88

99
<p><strong>Note</strong> that <code>word1</code> and <code>word2</code> may be the same. It is guaranteed that they represent <strong>two individual words</strong> in the list.</p>
1010

solution/0300-0399/0352.Data Stream as Disjoint Intervals/README_EN.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ summaryRanges.getIntervals(); // return [[1, 3], [6, 7]]
4444
<ul>
4545
<li><code>0 &lt;= value &lt;= 10<sup>4</sup></code></li>
4646
<li>At most <code>3 * 10<sup>4</sup></code> calls will be made to <code>addNum</code> and <code>getIntervals</code>.</li>
47+
<li>At most <code>10<sup>2</sup></code>&nbsp;calls will be made to&nbsp;<code>getIntervals</code>.</li>
4748
</ul>
4849

4950
<p>&nbsp;</p>

solution/0400-0499/0409.Longest Palindrome/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,16 @@
2525

2626
<pre>
2727
<strong>输入:</strong>s = "a"
28-
<strong>输入:</strong>1
28+
<strong>输出:</strong>1
2929
</pre>
3030

3131
<p><strong>示例 3:</strong></p>
3232

3333
<pre>
3434
<strong>输入:</strong>s = "aaaaaccc"
35-
<strong>输入:</strong>7</pre>
35+
<strong>输出:</strong>7</pre>
36+
37+
<p>&nbsp;</p>
3638

3739
<p><strong>提示:</strong></p>
3840

solution/0400-0499/0472.Concatenated Words/README.md

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

99
<p>给你一个 <strong>不含重复 </strong>单词的字符串数组 <code>words</code> ,请你找出并返回 <code>words</code> 中的所有 <strong>连接词</strong> 。</p>
1010

11-
<p><strong>连接词</strong> 定义为:一个完全由给定数组中的至少两个较短单词组成的字符串。</p>
11+
<p><strong>连接词</strong> 定义为:一个完全由给定数组中的至少两个较短单词(不一定是不同的两个单词)组成的字符串。</p>
1212

1313
<p>&nbsp;</p>
1414

@@ -34,9 +34,10 @@
3434

3535
<ul>
3636
<li><code>1 &lt;= words.length &lt;= 10<sup>4</sup></code></li>
37-
<li><code>0 &lt;= words[i].length &lt;= 30</code></li>
38-
<li><code>words[i]</code> 仅由小写字母组成</li>
39-
<li><code>0 &lt;= sum(words[i].length) &lt;= 10<sup>5</sup></code></li>
37+
<li><code>1 &lt;= words[i].length &lt;= 30</code></li>
38+
<li><code>words[i]</code>&nbsp;仅由小写英文字母组成。</li>
39+
<li>&nbsp;<code>words</code>&nbsp;中的所有字符串都是 <strong>唯一</strong> 的。</li>
40+
<li><code>1 &lt;= sum(words[i].length) &lt;= 10<sup>5</sup></code></li>
4041
</ul>
4142

4243
## 解法

solution/0400-0499/0495.Teemo Attacking/README.md

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

1111
<p>当提莫攻击艾希,艾希的中毒状态正好持续&nbsp;<code>duration</code> 秒。</p>
1212

13-
<p>正式地讲,提莫在 <code>t</code> 发起发起攻击意味着艾希在时间区间 <code>[t, t + duration - 1]</code>(含 <code>t</code> 和 <code>t + duration - 1</code>)处于中毒状态。如果提莫在中毒影响结束 <strong>前</strong> 再次攻击,中毒状态计时器将会 <strong>重置</strong> ,在新的攻击之后,中毒影响将会在 <code>duration</code> 秒后结束。</p>
13+
<p>正式地讲,提莫在 <code>t</code> 发起攻击意味着艾希在时间区间 <code>[t, t + duration - 1]</code>(含 <code>t</code> 和 <code>t + duration - 1</code>)处于中毒状态。如果提莫在中毒影响结束 <strong>前</strong> 再次攻击,中毒状态计时器将会 <strong>重置</strong> ,在新的攻击之后,中毒影响将会在 <code>duration</code> 秒后结束。</p>
1414

1515
<p>给你一个 <strong>非递减</strong> 的整数数组 <code>timeSeries</code> ,其中 <code>timeSeries[i]</code> 表示提莫在 <code>timeSeries[i]</code> 秒时对艾希发起攻击,以及一个表示中毒持续时间的整数 <code>duration</code> 。</p>
1616

solution/1200-1299/1237.Find Positive Integer Solution for a Given Equation/README_EN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class Solution:
107107
# Note that f(x, y) is increasing with respect to both x and y.
108108
# i.e. f(x, y) < f(x + 1, y), f(x, y) < f(x, y + 1)
109109
def f(self, x, y):
110-
110+
111111
"""
112112

113113

solution/1600-1699/1605.Find Valid Matrix Given Row and Column Sums/README_EN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Another possible matrix is: [[1,2],
4242
<ul>
4343
<li><code>1 &lt;= rowSum.length, colSum.length &lt;= 500</code></li>
4444
<li><code>0 &lt;= rowSum[i], colSum[i] &lt;= 10<sup>8</sup></code></li>
45-
<li><code>sum(rows) == sum(columns)</code></li>
45+
<li><code>sum(rowSum) == sum(colSum)</code></li>
4646
</ul>
4747

4848
## Solutions

solution/2500-2599/2557.Maximum Number of Integers to Choose From a Range II/README_EN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<strong>Input:</strong> banned = [1,4,6], n = 6, maxSum = 4
2323
<strong>Output:</strong> 1
2424
<strong>Explanation:</strong> You can choose the integer 3.
25-
3 is in the range [1, 6], and do not appear in banned. The sum of the choosen integers is 3, which does not ecxeed maxSum.
25+
3 is in the range [1, 6], and do not appear in banned. The sum of the chosen integers is 3, which does not exceed maxSum.
2626
</pre>
2727

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

0 commit comments

Comments
 (0)