Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a6df486

Browse files
authoredJun 22, 2024··
feat: update lc problems (#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

0 commit comments

Comments
 (0)
Please sign in to comment.