Skip to content

Commit 79aba16

Browse files
yanglbmeidoocs
andauthored
feat: update lc problems (doocs#2421)
Co-authored-by: Doocs Bot <doocs-bot@outlook.com>
1 parent 5011d97 commit 79aba16

File tree

194 files changed

+14294
-13021
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

194 files changed

+14294
-13021
lines changed

solution/0000-0099/0003.Longest Substring Without Repeating Characters/README.md

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

99
<!-- 这里写题目描述 -->
1010

11-
<p>给定一个字符串 <code>s</code> ,请你找出其中不含有重复字符的&nbsp;<strong>最长子串&nbsp;</strong>的长度。</p>
11+
<p>给定一个字符串 <code>s</code> ,请你找出其中不含有重复字符的&nbsp;<strong>最长<span data-keyword="substring">子串</span></strong><strong>&nbsp;</strong>的长度。</p>
1212

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

solution/0000-0099/0005.Longest Palindromic Substring/README.md

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

99
<!-- 这里写题目描述 -->
1010

11-
<p>给你一个字符串 <code>s</code>,找到 <code>s</code> 中最长的回文子串。</p>
11+
<p>给你一个字符串 <code>s</code>,找到 <code>s</code> 中最长的回文<span data-keyword="substring">子串</span>。</p>
1212

1313
<p>如果字符串的反序与原始字符串相同,则该字符串称为回文字符串。</p>
1414

solution/0000-0099/0009.Palindrome Number/README.md

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

1111
<p>给你一个整数 <code>x</code> ,如果 <code>x</code> 是一个回文整数,返回 <code>true</code> ;否则,返回 <code>false</code> 。</p>
1212

13-
<p>回文数是指正序(从左向右)和倒序(从右向左)读都是一样的整数。</p>
13+
<p><span data-keyword="palindrome-integer">回文数</span>是指正序(从左向右)和倒序(从右向左)读都是一样的整数。</p>
1414

1515
<ul>
1616
<li>例如,<code>121</code> 是回文,而 <code>123</code> 不是。</li>

solution/0000-0099/0023.Merge k Sorted Lists/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,7 @@ public class Solution {
348348
class ListNode {
349349
public $val;
350350
public $next;
351-
public function __construct($val = 0, $next = null)
352-
{
351+
public function __construct($val = 0, $next = null) {
353352
$this->val = $val;
354353
$this->next = $next;
355354
}

solution/0000-0099/0023.Merge k Sorted Lists/README_EN.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,8 +347,7 @@ public class Solution {
347347
class ListNode {
348348
public $val;
349349
public $next;
350-
public function __construct($val = 0, $next = null)
351-
{
350+
public function __construct($val = 0, $next = null) {
352351
$this->val = $val;
353352
$this->next = $next;
354353
}

solution/0000-0099/0032.Longest Valid Parentheses/README.md

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

99
<!-- 这里写题目描述 -->
1010

11-
<p>给你一个只包含 <code>'('</code> 和 <code>')'</code> 的字符串,找出最长有效(格式正确且连续)括号子串的长度。</p>
11+
<p>给你一个只包含 <code>'('</code>&nbsp;和 <code>')'</code>&nbsp;的字符串,找出最长有效(格式正确且连续)括号<span data-keyword="substring">子串</span>的长度。</p>
1212

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

1515
<div class="original__bRMd">
1616
<div>
@@ -37,12 +37,12 @@
3737
<strong>输出:</strong>0
3838
</pre>
3939

40-
<p> </p>
40+
<p>&nbsp;</p>
4141

4242
<p><strong>提示:</strong></p>
4343

4444
<ul>
45-
<li><code>0 <= s.length <= 3 * 10<sup>4</sup></code></li>
45+
<li><code>0 &lt;= s.length &lt;= 3 * 10<sup>4</sup></code></li>
4646
<li><code>s[i]</code> 为 <code>'('</code> 或 <code>')'</code></li>
4747
</ul>
4848
</div>

solution/0000-0099/0041.First Missing Positive/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,36 +11,36 @@
1111
<p>给你一个未排序的整数数组 <code>nums</code> ,请你找出其中没有出现的最小的正整数。</p>
1212
请你实现时间复杂度为 <code>O(n)</code> 并且只使用常数级别额外空间的解决方案。
1313

14-
<p> </p>
14+
<p>&nbsp;</p>
1515

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

1818
<pre>
1919
<strong>输入:</strong>nums = [1,2,0]
2020
<strong>输出:</strong>3
21-
</pre>
21+
<strong>解释:</strong>范围 [1,2] 中的数字都在数组中。</pre>
2222

2323
<p><strong>示例 2:</strong></p>
2424

2525
<pre>
2626
<strong>输入:</strong>nums = [3,4,-1,1]
2727
<strong>输出:</strong>2
28-
</pre>
28+
<strong>解释:</strong>1 在数组中,但 2 没有。</pre>
2929

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

3232
<pre>
3333
<strong>输入:</strong>nums = [7,8,9,11,12]
3434
<strong>输出:</strong>1
35-
</pre>
35+
<strong>解释:</strong>最小的正数 1 没有出现。</pre>
3636

37-
<p> </p>
37+
<p>&nbsp;</p>
3838

3939
<p><strong>提示:</strong></p>
4040

4141
<ul>
42-
<li><code>1 <= nums.length <= 5 * 10<sup>5</sup></code></li>
43-
<li><code>-2<sup>31</sup> <= nums[i] <= 2<sup>31</sup> - 1</code></li>
42+
<li><code>1 &lt;= nums.length &lt;= 10<sup>5</sup></code></li>
43+
<li><code>-2<sup>31</sup> &lt;= nums[i] &lt;= 2<sup>31</sup> - 1</code></li>
4444
</ul>
4545

4646
## 解法

solution/0000-0099/0041.First Missing Positive/README_EN.md

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

77
## Description
88

9-
<p>Given an unsorted integer array <code>nums</code>, return the smallest missing positive integer.</p>
9+
<p>Given an unsorted integer array <code>nums</code>. Return the <em>smallest positive integer</em> that is <em>not present</em> in <code>nums</code>.</p>
1010

1111
<p>You must implement an algorithm that runs in <code>O(n)</code> time and uses <code>O(1)</code> auxiliary space.</p>
1212

solution/0000-0099/0053.Maximum Subarray/README.md

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

1111
<p>给你一个整数数组 <code>nums</code> ,请你找出一个具有最大和的连续子数组(子数组最少包含一个元素),返回其最大和。</p>
1212

13-
<p><strong>子数组 </strong>是数组中的一个连续部分。</p>
13+
<p><strong><span data-keyword="subarray-nonempty">子数组 </span></strong>是数组中的一个连续部分。</p>
1414

1515
<p>&nbsp;</p>
1616

solution/0000-0099/0058.Length of Last Word/README.md

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

1111
<p>给你一个字符串 <code>s</code>,由若干单词组成,单词前后用一些空格字符隔开。返回字符串中 <strong>最后一个</strong> 单词的长度。</p>
1212

13-
<p><strong>单词</strong> 是指仅由字母组成、不包含任何空格字符的最大子字符串。</p>
13+
<p><strong>单词</strong> 是指仅由字母组成、不包含任何空格字符的最大<span data-keyword="substring">子字符串</span>。</p>
1414

1515
<p>&nbsp;</p>
1616

0 commit comments

Comments
 (0)