Skip to content

Commit 5924f90

Browse files
authored
Merge pull request #957 from TC-zerol/master
fixed (修改剑指offer35,47,目录问题)
2 parents d079dd8 + 7639790 commit 5924f90

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

notes/35. 复杂链表的复制.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ public RandomListNode Clone(RandomListNode pHead) {
6161
RandomListNode next = cur.next;
6262
cur.next = next.next;
6363
cur = next;
64+
next.next = cur.next;
6465
}
6566
return pCloneHead;
6667
}

notes/47. 礼物的最大价值.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public int getMost(int[][] values) {
2828
for (int[] value : values) {
2929
dp[0] += value[0];
3030
for (int i = 1; i < n; i++)
31-
dp[i] = Math.max(dp[i], dp[i - 1]) + value[i];
31+
dp[i] = Math.max(dp[i] + value[i], dp[i - 1]) + value[i];
3232
}
3333
return dp[n - 1];
3434
}

notes/剑指 Offer 题解 - 目录.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
- [41.1 数据流中的中位数](41.1%20数据流中的中位数.md)
5656
- [41.2 字符流中第一个不重复的字符](41.2%20字符流中第一个不重复的字符.md)
5757
- [42. 连续子数组的最大和](42.%20连续子数组的最大和.md)
58-
- [43. 从 1 到 n 整数中 1 出现的次数](43.%20从%201%20到%20n%20整数中%201%20出现的次数)
58+
- [43. 从 1 到 n 整数中 1 出现的次数](43.%20从%201%20到%20n%20整数中%201%20出现的次数.md)
5959
- [44. 数字序列中的某一位数字](44.%20数字序列中的某一位数字.md)
6060
- [45. 把数组排成最小的数](45.%20把数组排成最小的数.md)
6161
- [46. 把数字翻译成字符串](46.%20把数字翻译成字符串.md)

0 commit comments

Comments
 (0)