未验证 提交 9f2bdd61 编写于 作者: 郑永川 提交者: GitHub

Merge pull request #528 from Codywei/patch-3

234回文链表处的一个注解修改
......@@ -4243,7 +4243,7 @@ public boolean isPalindrome(ListNode head) {
slow = slow.next;
fast = fast.next.next;
}
if (fast != null) slow = slow.next; // 偶数节点,让 slow 指向下一个节点
if (fast != null) slow = slow.next; // 链表节点个数为奇数,让 slow 指向下一个节点
cut(head, slow); // 切成两个链表
return isEqual(head, reverse(slow));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册