Merge pull request #957 from TC-zerol/master

fixed (修改剑指offer35,47,目录问题)
This commit is contained in:
CyC2018 2020-11-01 23:58:31 +08:00 committed by GitHub
commit 5924f90768
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

View File

@ -61,6 +61,7 @@ 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], dp[i - 1]) + value[i];
dp[i] = Math.max(dp[i] + value[i], dp[i - 1]) + value[i];
}
return dp[n - 1];
}

View File

@ -55,7 +55,7 @@
- [41.1 数据流中的中位数](41.1%20数据流中的中位数.md)
- [41.2 字符流中第一个不重复的字符](41.2%20字符流中第一个不重复的字符.md)
- [42. 连续子数组的最大和](42.%20连续子数组的最大和.md)
- [43. 1 n 整数中 1 出现的次数](43.%20从%201%20到%20n%20整数中%201%20出现的次数)
- [43. 1 n 整数中 1 出现的次数](43.%20从%201%20到%20n%20整数中%201%20出现的次数.md)
- [44. 数字序列中的某一位数字](44.%20数字序列中的某一位数字.md)
- [45. 把数组排成最小的数](45.%20把数组排成最小的数.md)
- [46. 把数字翻译成字符串](46.%20把数字翻译成字符串.md)