@@ -0,0 +1,1482 @@
+package me.wayne.leetcodetop100.listnode;%0A%0Aimport java.util.Collections;%0Aimport java.util.LinkedList;%0Aimport java.util.List;%0A%0Aimport me.wayne.leetcodetop100.ListNode;%0A%0A/**%0A * %E7%BB%99%E4%BD%A0%E4%B8%80%E4%B8%AA%E5%8D%95%E9%93%BE%E8%A1%A8%E7%9A%84%E5%A4%B4%E8%8A%82%E7%82%B9 head %EF%BC%8C%E8%AF%B7%E4%BD%A0%E5%88%A4%E6%96%AD%E8%AF%A5%E9%93%BE%E8%A1%A8%E6%98%AF%E5%90%A6%E4%B8%BA%E5%9B%9E%E6%96%87%E9%93%BE%E8%A1%A8%E3%80%82%0A * %E5%A6%82%E6%9E%9C%E6%98%AF%EF%BC%8C%E8%BF%94%E5%9B%9E true %EF%BC%9B%E5%90%A6%E5%88%99%EF%BC%8C%E8%BF%94%E5%9B%9E false %E3%80%82%0A * %3Cp%3E%0A * https://leetcode-cn.com/problems/palindrome-linked-list/%0A */%0Apublic class LC234_IsPalindrome %7B%0A%0A    public boolean isPalindrome(ListNode head) %7B%0A        // %E6%B1%82%E5%87%BA%E4%B8%AD%E9%97%B4%E7%BB%93%E7%82%B9%0A        ListNode half = getHalfNode(head);%0A        // %E5%B0%86%E4%B8%AD%E9%97%B4%E5%BC%80%E5%A7%8B%E7%9A%84%E5%90%8E%E5%8D%8A%E9%83%A8%E6%94%BE%E5%88%B0List%E5%BD%93%E4%B8%AD%EF%BC%8C%E5%86%8D%E5%8F%8D%E8%BD%AC%0A        List%3CListNode%3E halfList = new LinkedList%3C%3E();%0A        while (half != null) %7B%0A            halfList.add(half);%0A            half = half.next;%0A        %7D%0A        Collections.reverse(halfList);%0A%0A        boolean res = true;%0A        for (ListNode node : halfList) %7B%0A            if (node.val != head.val) %7B%0A                res = false;%0A                break;%0A            %7D%0A            head = head.next;%0A        %7D%0A%0A        return res;%0A    %7D%0A%0A    private ListNode getHalfNode(ListNode head) %7B%0A        if (head == null) %7B%0A            return null;%0A        %7D%0A%0A        int count = 0;%0A        ListNode slow = head;%0A        ListNode fast = head;%0A        while (fast != null) %7B%0A            count++;%0A            fast = fast.next;%0A            if (fast != null) %7B%0A                count++;%0A                fast = fast.next;%0A                slow = slow.next;%0A            %7D%0A        %7D%0A        // %E9%93%BE%E8%A1%A8%E9%95%BF%E5%BA%A6%E6%98%AF%E5%A5%87%E6%95%B0%E4%B8%AA%EF%BC%8C%E5%88%99%E5%86%8D%E5%BE%80%E5%90%8E%E4%B8%80%E4%BD%8D%0A        if (count %25 2 != 0) %7B%0A            slow = slow.next;%0A        %7D%0A        return slow;%0A    %7D%0A%7D%0A

add LC234_IsPalindrome