auto commit

This commit is contained in:
CyC2018
2020-11-01 23:59:01 +08:00
parent 5924f90768
commit 8d08e48c54
3 changed files with 2 additions and 3 deletions

View File

@ -61,7 +61,6 @@ public RandomListNode Clone(RandomListNode pHead) {
RandomListNode next = cur.next;
cur.next = next.next;
cur = next;
next.next = cur.next;
}
return pCloneHead;
}

View File

@ -28,7 +28,7 @@ public int getMost(int[][] values) {
for (int[] value : values) {
dp[0] += value[0];
for (int i = 1; i < n; i++)
dp[i] = Math.max(dp[i] + value[i], dp[i - 1]) + value[i];
dp[i] = Math.max(dp[i], dp[i - 1]) + value[i];
}
return dp[n - 1];
}