auto commit
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
@ -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];
|
||||
}
|
||||
|
Reference in New Issue
Block a user