@@ -0,0 +1,1547 @@
+/**%0A * Definition for singly-linked list.%0A * class ListNode %7B%0A *     int val;%0A *     ListNode next;%0A *     ListNode(int x) %7B%0A *         val = x;%0A *         next = null;%0A *     %7D%0A * %7D%0A */%0Apublic class Solution %7B%0A    private ListNode reverseList(ListNode head) %7B%0A        ListNode p = new ListNode(0); //dummy node%0A        while(head != null) %7B%0A            ListNode temp = head;%0A            head = head.next;%0A            temp.next = p.next;%0A            p.next = temp;%0A        %7D%0A        %0A        return p.next;%0A    %7D%0A    %0A    private ListNode mergeLists(ListNode list1, ListNode list2) %7B%0A        ListNode p = new ListNode(0); //dummy node%0A        %0A        while(list1 != null && list2 != null) %7B%0A            p.next = list1;%0A            list1 = list1.next;%0A            p.next.next = list2;%0A            list2 = list2.next;%0A            p = p.next.next;%0A        %7D%0A        %0A        if (list1 != null) %7B%0A            p.next = list1;%0A        %7D else %7B%0A            p.next = list2;%0A        %7D%0A        %0A        return p.next;%0A    %7D%0A    %0A    public void reorderList(ListNode head) %7B%0A        if (head == null %7C%7C head.next == null) %7B%0A            return;%0A        %7D%0A        %0A        ListNode fast = head;%0A        ListNode slow = head;%0A        ListNode prev = head;%0A        %0A        while(fast != null && fast.next != null) %7B%0A            fast = fast.next.next;%0A            prev = slow;%0A            slow = slow.next;%0A        %7D%0A        %0A        prev.next = null;%0A        ListNode rightHalf = reverseList(slow);%0A        %0A        head = mergeLists(head, rightHalf);%0A    %7D%0A%7D%0A

Create Reorder_List.java