Skip to content

Commit c72c4ef

Browse files
committed
format docs
1 parent cacb7b6 commit c72c4ef

File tree

6 files changed

+9
-16
lines changed

6 files changed

+9
-16
lines changed

content/zh/docs/leetcode/0101-0200/0122.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ description: "122.买卖股票的最佳时机 II"
2828
输入: prices = [7,1,5,3,6,4]
2929
输出: 7
3030
解释: 在第 2 天(股票价格 = 1)的时候买入,在第 3 天(股票价格 = 5)的时候卖出, 这笔交易所能获得利润 = 5-1 = 4 。
31-
随后,在第 4 天(股票价格 = 3)的时候买入,在第 5 天(股票价格 = 6)的时候卖出, 这笔交易所能获得利润 = 6-3 = 3
31+
随后,在第 4 天(股票价格 = 3)的时候买入,在第 5 天(股票价格 = 6)的时候卖出, 这笔交易所能获得利润 = 6-3 = 3
3232
```
3333

3434
### **示例 2**
@@ -43,7 +43,7 @@ description: "122.买卖股票的最佳时机 II"
4343

4444
### **限制**
4545

46-
- 1 <= prices.length <= 3 * 104
46+
- 1 <= prices.length <= 3 \* 104
4747
- 0 <= prices[i] <= 104
4848

4949
## 题解
@@ -81,7 +81,6 @@ func maxProfit_1(prices []int) int {
8181

8282
{{< /tabs >}}
8383

84-
8584
### 思路 2:**动态规划**
8685

8786
#### 算法流程

content/zh/docs/leetcode/0101-0200/0123.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ description: "123.买卖股票的最佳时机 III"
3535
```text
3636
输入:prices = [1,2,3,4,5]
3737
输出:4
38-
解释:在第 1 天(股票价格 = 1)的时候买入,在第 5 天 (股票价格 = 5)的时候卖出, 这笔交易所能获得利润 = 5-1 = 4 。  
39-
注意你不能在第 1 天和第 2 天接连购买股票,之后再将它们卖出。  
38+
解释:在第 1 天(股票价格 = 1)的时候买入,在第 5 天 (股票价格 = 5)的时候卖出, 这笔交易所能获得利润 = 5-1 = 4 。  
39+
注意你不能在第 1 天和第 2 天接连购买股票,之后再将它们卖出。  
4040
因为这样属于同时参与了多笔交易,你必须在再次购买前出售掉之前的股票。
4141
```
4242

content/zh/docs/leetcode/0101-0200/0188.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ description: "188.买卖股票的最佳时机 IV"
1212
{{< button href="https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock-iv/" >}}题目地址{{< /button >}}
1313
{{< button href="https://github.com/kylesliu/awesome-golang-algorithm/tree/master/leetcode/101-200/0188.Best-Time-to-Buy-and-Sell-Stock-IV" >}}代码{{< /button >}}
1414

15-
给定一个整数数组prices ,它的第 i 个元素prices[i] 是一支给定的股票在第 i 天的价格。
15+
给定一个整数数组 prices ,它的第 i 个元素 prices[i] 是一支给定的股票在第 i 天的价格。
1616
设计一个算法来计算你所能获取的最大利润。你最多可以完成 k 笔交易。
1717

1818
{{< hint info >}}

content/zh/docs/leetcode/0301-0400/0309.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ description: "309.最佳买卖股票时机含冷冻期"
1212
{{< button href="https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock-with-cooldown/" >}}题目地址{{< /button >}}
1313
{{< button href="https://github.com/kylesliu/awesome-golang-algorithm/tree/master/leetcode/301-400/0309.Best-Time-to-Buy-and-Sell-Stock-with-Cooldown" >}}代码{{< /button >}}
1414

15-
给定一个整数数组,其中第i个元素代表了第i天的股票价格
15+
给定一个整数数组,其中第 i 个元素代表了第 i 天的股票价格
1616
设计一个算法计算出最大利润。在满足以下约束条件下,你可以尽可能地完成更多的交易(多次买卖一支股票):
1717
你不能同时参与多笔交易(你必须在再次购买前出售掉之前的股票)。
1818
卖出股票后,你无法在第二天买入股票 (即冷冻期为 1 天)。
@@ -27,7 +27,7 @@ description: "309.最佳买卖股票时机含冷冻期"
2727

2828
```text
2929
输入: [1,2,3,0,2]
30-
输出: 3
30+
输出: 3
3131
解释: 对应的交易状态为: [买入, 卖出, 冷冻期, 买入, 卖出]
3232
```
3333

content/zh/docs/leetcode/0701-0800/0714.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ description: "714.买卖股票的最佳时机含手续费"
1212
{{< button href="https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock-with-transaction-fee/" >}}题目地址{{< /button >}}
1313
{{< button href="https://github.com/kylesliu/awesome-golang-algorithm/tree/master/leetcode/701-800/0714.Best-Time-to-Buy-and-Sell-Stock-with-Transaction-Fee" >}}代码{{< /button >}}
1414

15-
给定一个整数数组prices,其中第i个元素代表了第i天的股票价格 ;整数fee 代表了交易股票的手续费用。
15+
给定一个整数数组 prices,其中第 i 个元素代表了第 i 天的股票价格 ;整数 fee 代表了交易股票的手续费用。
1616
你可以无限次地完成交易,但是你每笔交易都需要付手续费。如果你已经购买了一个股票,在卖出它之前你就不能再继续购买股票了。
1717
返回获得利润的最大值。
1818

@@ -27,7 +27,7 @@ description: "714.买卖股票的最佳时机含手续费"
2727
```text
2828
输入:prices = [1, 3, 2, 8, 4, 9], fee = 2
2929
输出:8
30-
解释:能够达到的最大利润:
30+
解释:能够达到的最大利润:
3131
在此处买入 prices[0] = 1
3232
在此处卖出 prices[3] = 8
3333
在此处买入 prices[4] = 4

content/zh/docs/summary/_index.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@ title: "SUMMARY"
1313

1414
{{< /hint >}}
1515

16-
https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock/solution/121-mai-mai-gu-piao-de-zui-jia-shi-ji-ba-lx8t/
17-
18-
https://katex.org/docs/support_table.html
19-
20-
https://mermaid-js.github.io/mermaid/#/Setup
21-
2216
## 股票买卖
2317

2418
| 题目 | 描述 |

0 commit comments

Comments
 (0)