From bada236d6ce0222918782840b3390c7423146490 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=B4=AA=E5=B7=9E?= Date: Thu, 30 May 2019 11:52:31 +0800 Subject: [PATCH 1/2] =?UTF-8?q?Update=20Leetcode=20=E9=A2=98=E8=A7=A3=20-?= =?UTF-8?q?=20=E5=8A=A8=E6=80=81=E8=A7=84=E5=88=92.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 勘误 --- docs/notes/Leetcode 题解 - 动态规划.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/notes/Leetcode 题解 - 动态规划.md b/docs/notes/Leetcode 题解 - 动态规划.md index 63fc6d2e..4fe9fbbb 100644 --- a/docs/notes/Leetcode 题解 - 动态规划.md +++ b/docs/notes/Leetcode 题解 - 动态规划.md @@ -299,7 +299,7 @@ dp[4] = dp[3] + 1 = 3 综上,在 A[i] - A[i-1] == A[i-1] - A[i-2] 时,dp[i] = dp[i-1] + 1。 -因为递增子区间不一定以最一个元素为结尾,可以是任意一个元素结尾,因此需要返回 dp 数组累加的结果。 +因为递增子区间不一定以最后一个元素为结尾,可以是任意一个元素结尾,因此需要返回 dp 数组累加的结果。 ```java public int numberOfArithmeticSlices(int[] A) { From 2649dfef7f89f3857d01dfe9c5eda01ee9245176 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E4=B8=89=E6=80=9D?= <1195056983@qq.com> Date: Tue, 4 Jun 2019 11:57:48 +0800 Subject: [PATCH 2/2] =?UTF-8?q?Leetcode=20=E9=A2=98=E8=A7=A3=20-=20?= =?UTF-8?q?=E9=93=BE=E8=A1=A8.md-=E6=96=B0=E5=A2=9E=E4=BA=86=E5=85=B3?= =?UTF-8?q?=E4=BA=8E=E9=93=BE=E8=A1=A8=E6=9C=89=E4=BA=A4=E7=82=B9=E7=9A=84?= =?UTF-8?q?=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- notes/Leetcode 题解 - 链表.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notes/Leetcode 题解 - 链表.md b/notes/Leetcode 题解 - 链表.md index 8f343f7d..ffdf390f 100644 --- a/notes/Leetcode 题解 - 链表.md +++ b/notes/Leetcode 题解 - 链表.md @@ -44,9 +44,9 @@ public ListNode getIntersectionNode(ListNode headA, ListNode headB) { ``` 如果只是判断是否存在交点,那么就是另一个问题,即 [编程之美 3.6]() 的问题。有两种解法: - - 把第一个链表的结尾连接到第二个链表的开头,看第二个链表是否存在环; - 或者直接比较两个链表的最后一个节点是否相同。 +> 说明:关于两个链表是否有交点,有一种错误的理解,不妨举个例子, 链表L1: 1>2>3, 链表L2: 4>2>5, 如此不叫链表,链表相交必然从交点后重合,因为上面的例子汇中,2结点不能有两个后续结点,那叫做图,不叫链表。 # 2. 链表反转