auto commit

This commit is contained in:
CyC2018
2019-01-10 12:48:44 +08:00
parent b797fbde67
commit 34083b3359
3 changed files with 6 additions and 2 deletions

View File

@ -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));
}