mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-08 00:43:04 +08:00
删减了309一维数组空间优化的部分注释
This commit is contained in:
@ -189,9 +189,8 @@ class Solution {
|
||||
// 一维数组优化
|
||||
class Solution {
|
||||
public int maxProfit(int[] prices) {
|
||||
// dp[2]和dp[3]用来存储冷冻期的数据
|
||||
int[] dp=new int[4];
|
||||
// 0表示持有,1表示卖出
|
||||
|
||||
dp[0] = -prices[0];
|
||||
dp[1] = 0;
|
||||
for(int i = 1; i <= prices.length; i++){
|
||||
|
Reference in New Issue
Block a user