Skip to content

Commit a6df486

Browse files
authored
feat: update lc problems (doocs#3149)
1 parent ae5bc33 commit a6df486

File tree

64 files changed

+10197
-10112
lines changed

Some content is hidden

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

64 files changed

+10197
-10112
lines changed

solution/0000-0099/0092.Reverse Linked List II/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ tags:
1616

1717
<!-- description:start -->
1818

19-
给你单链表的头指针 <code>head</code> 和两个整数  <code>left</code> 和 <code>right</code> ,其中  <code>left <= right</code> 。请你反转从位置 <code>left</code> 到位置 <code>right</code> 的链表节点,返回 <strong>反转后的链表</strong> 。
19+
给你单链表的头指针 <code>head</code> 和两个整数 <code>left</code> 和 <code>right</code> ,其中 <code>left <= right</code> 。请你反转从位置 <code>left</code> 到位置 <code>right</code> 的链表节点,返回 <strong>反转后的链表</strong> 。
2020

2121
<p> </p>
2222

solution/0100-0199/0122.Best Time to Buy and Sell Stock II/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,24 +31,24 @@ tags:
3131
<pre>
3232
<strong>输入:</strong>prices = [7,1,5,3,6,4]
3333
<strong>输出:</strong>7
34-
<strong>解释:</strong>在第 2 天(股票价格 = 1)的时候买入,在第 3 天(股票价格 = 5)的时候卖出, 这笔交易所能获得利润 = 5 - 1 = 4
35-
&nbsp; 随后,在第 4 天(股票价格 = 3)的时候买入,在第 5 天(股票价格 = 6)的时候卖出, 这笔交易所能获得利润 = 6 - 3 = 3
36-
总利润为 4 + 3 = 7 。</pre>
34+
<strong>解释:</strong>在第 2 天(股票价格 = 1)的时候买入,在第 3 天(股票价格 = 5)的时候卖出, 这笔交易所能获得利润 = 5 - 1 = 4。
35+
随后,在第 4 天(股票价格 = 3)的时候买入,在第 5 天(股票价格 = 6)的时候卖出, 这笔交易所能获得利润 = 6 - 3 = 3。
36+
最大总利润为 4 + 3 = 7 。</pre>
3737

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

4040
<pre>
4141
<strong>输入:</strong>prices = [1,2,3,4,5]
4242
<strong>输出:</strong>4
43-
<strong>解释:</strong>在第 1 天(股票价格 = 1)的时候买入,在第 5 天 (股票价格 = 5)的时候卖出, 这笔交易所能获得利润 = 5 - 1 = 4
44-
&nbsp; 总利润为 4 。</pre>
43+
<strong>解释:</strong>在第 1 天(股票价格 = 1)的时候买入,在第 5 天 (股票价格 = 5)的时候卖出, 这笔交易所能获得利润 = 5 - 1 = 4。
44+
最大总利润为 4 。</pre>
4545

4646
<p><strong>示例&nbsp;3:</strong></p>
4747

4848
<pre>
4949
<strong>输入:</strong>prices = [7,6,4,3,1]
5050
<strong>输出:</strong>0
51-
<strong>解释:</strong>在这种情况下, 交易无法获得正利润,所以不参与交易可以获得最大利润,最大利润为 0 。</pre>
51+
<strong>解释:</strong>在这种情况下, 交易无法获得正利润,所以不参与交易可以获得最大利润,最大利润为 0。</pre>
5252

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

solution/0100-0199/0168.Excel Sheet Column Title/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ tags:
99

1010
<!-- problem:start -->
1111

12-
# [168. Excel 表列名称](https://leetcode.cn/problems/excel-sheet-column-title)
12+
# [168. Excel表列名称](https://leetcode.cn/problems/excel-sheet-column-title)
1313

1414
[English Version](/solution/0100-0199/0168.Excel%20Sheet%20Column%20Title/README_EN.md)
1515

solution/0100-0199/0177.Nth Highest Salary/README.md

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

99
<!-- problem:start -->
1010

11-
# [177. 第 N 高的薪水](https://leetcode.cn/problems/nth-highest-salary)
11+
# [177. 第N高的薪水](https://leetcode.cn/problems/nth-highest-salary)
1212

1313
[English Version](/solution/0100-0199/0177.Nth%20Highest%20Salary/README_EN.md)
1414

solution/0100-0199/0187.Repeated DNA Sequences/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ tags:
1313

1414
<!-- problem:start -->
1515

16-
# [187. 重复的 DNA 序列](https://leetcode.cn/problems/repeated-dna-sequences)
16+
# [187. 重复的DNA序列](https://leetcode.cn/problems/repeated-dna-sequences)
1717

1818
[English Version](/solution/0100-0199/0187.Repeated%20DNA%20Sequences/README_EN.md)
1919

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ tags:
99

1010
<!-- problem:start -->
1111

12-
# [191. 位 1 的个数](https://leetcode.cn/problems/number-of-1-bits)
12+
# [191. 位1的个数](https://leetcode.cn/problems/number-of-1-bits)
1313

1414
[English Version](/solution/0100-0199/0191.Number%20of%201%20Bits/README_EN.md)
1515

solution/0200-0299/0215.Kth Largest Element in an Array/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ tags:
1212

1313
<!-- problem:start -->
1414

15-
# [215. 数组中的第 K 个最大元素](https://leetcode.cn/problems/kth-largest-element-in-an-array)
15+
# [215. 数组中的第K个最大元素](https://leetcode.cn/problems/kth-largest-element-in-an-array)
1616

1717
[English Version](/solution/0200-0299/0215.Kth%20Largest%20Element%20in%20an%20Array/README_EN.md)
1818

solution/0200-0299/0230.Kth Smallest Element in a BST/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ tags:
1111

1212
<!-- problem:start -->
1313

14-
# [230. 二叉搜索树中第 K 小的元素](https://leetcode.cn/problems/kth-smallest-element-in-a-bst)
14+
# [230. 二叉搜索树中第K小的元素](https://leetcode.cn/problems/kth-smallest-element-in-a-bst)
1515

1616
[English Version](/solution/0200-0299/0230.Kth%20Smallest%20Element%20in%20a%20BST/README_EN.md)
1717

solution/0200-0299/0238.Product of Array Except Self/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ tags:
1717

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

20-
<p>给你一个整数数组&nbsp;<code>nums</code>,返回 <em>数组&nbsp;<code>answer</code>&nbsp;,其中&nbsp;<code>answer[i]</code>&nbsp;等于&nbsp;<code>nums</code>&nbsp;中除&nbsp;<code>nums[i]</code>&nbsp;之外其余各元素的乘积</em>&nbsp;。</p>
20+
<p>给你一个整数数组&nbsp;<code>nums</code>,返回 数组&nbsp;<code>answer</code>&nbsp;,其中&nbsp;<code>answer[i]</code>&nbsp;等于&nbsp;<code>nums</code>&nbsp;中除&nbsp;<code>nums[i]</code>&nbsp;之外其余各元素的乘积&nbsp;。</p>
2121

2222
<p>题目数据 <strong>保证</strong> 数组&nbsp;<code>nums</code>之中任意元素的全部前缀元素和后缀的乘积都在&nbsp; <strong>32 位</strong> 整数范围内。</p>
2323

24-
<p>请&nbsp;<strong>不要使用除法,</strong>且在&nbsp;<code>O(<em>n</em>)</code> 时间复杂度内完成此题。</p>
24+
<p>请&nbsp;<strong>不要使用除法,</strong>且在&nbsp;<code>O(n)</code> 时间复杂度内完成此题。</p>
2525

2626
<p>&nbsp;</p>
2727

solution/0200-0299/0249.Group Shifted Strings/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ tags:
2222

2323
<ul>
2424
<li><strong>右移</strong>:将字符串中每个字母都变为其在字母表中 <strong>后续</strong> 的字母,其中用 'a' 替换 'z'。比如,<code>"abc"</code>&nbsp;能够右移为&nbsp;<code>"bcd"</code>,<code>"xyz"</code>&nbsp;能够右移为&nbsp;<code>"yza"</code>。</li>
25-
<li><strong>左移</strong>:将字符串中每个字母都变为其在字母表中 <b>之前</b>&nbsp;的字母,其中用 'z' 替换 'a'。比如,<code>"bcd"</code>&nbsp;能够右移为&nbsp;<code>"abc"</code>,<code>"yza"</code>&nbsp;能够右移为&nbsp;<code>"xyz"</code>。</li>
25+
<li><strong>左移</strong>:将字符串中每个字母都变为其在字母表中 <b>之前</b>&nbsp;的字母,其中用 'z' 替换 'a'。比如,<code>"bcd"</code>&nbsp;能够左移为&nbsp;<code>"abc"</code>,<code>"yza"</code>&nbsp;能够左移为&nbsp;<code>"xyz"</code>。</li>
2626
</ul>
2727

2828
<p>我们可以不断地向两个方向移动字符串,形成 <strong>无限的移位序列</strong>。</p>

0 commit comments

Comments
 (0)