public void reorderList(ListNode head) {
        if (head == null) return;
        ListNode n1 = head;
        ListNode n2 = head;
        while (n2.next != null && n2.next.next != null) {
            n2 = n2.next.next;
            n1 = n1.next;
        }
        ListNode n = n1.next;
        n1.next = null;

        n1 = head;
        n2 = reverse(n);
        while (n2 != null) {
            ListNode next1 = n1.next;
            ListNode next2 = n2.next;
            n1.next = n2;
            n2.next = next1;
            n1 = next1;
            n2 = next2;
        }
    }