diff --git a/problems/0122.买卖股票的最佳时机II.md b/problems/0122.买卖股票的最佳时机II.md index 83b852c6..1e6dc7c0 100644 --- a/problems/0122.买卖股票的最佳时机II.md +++ b/problems/0122.买卖股票的最佳时机II.md @@ -264,7 +264,7 @@ const maxProfit = (prices) => { dp[i][1] = Math.max(dp[i-1][1], dp[i-1][0] + prices[i]); } - return dp[prices.length -1][0]; + return dp[prices.length -1][1]; }; ```