Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2a6a8da

Browse files
authored
Update problems/0122.买卖股票的最佳时机II(动态规划).md
1 parent 2719dbd commit 2a6a8da

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

‎problems/0122.买卖股票的最佳时机II(动态规划).md‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,6 @@ impl Solution {
385385
pub fn max_profit(prices: Vec<i32>) -> i32 {
386386
let mut dp = vec![-prices[0], 0];
387387
for p in prices {
388-
// 可以看作 low、res
389388
dp[0] = dp[0].max(dp[1] - p);
390389
dp[1] = dp[1].max(dp[0] + p);
391390
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /