# I have the same problem.

• I pasted my code here, I didn't use the approach that reverse the second half of the list, but I think my solution should also work. Could anyone point out where I'm wrong please. I failed to pass the input of :Last executed input: {3,2,3,3,3,1,3,1,3,3,1,1,3,3,2,1,1,1,1,2,1,1,2,1,2,1,3,2,...........

``````public class Solution  {
// IMPORTANT: Please reset any member data you declared, as
// the same Solution instance will be reused for each test case.
boolean odd = false;
return;
}
while (fast.next!=null && fast.next.next!=null){
fast = fast.next.next;
slow = slow.next;
}
if (fast.next==null){
odd = true;
}
}

public ListNode reorder(boolean odd, ListNode mid, ListNode head){
ListNode res;
if (odd){
return res;
}
return res;
}

ListNode current = reorder(odd, mid, head.next);
res = current.next;
return res;
}
``````

}

• I met the same problem before. I guess it is because the recursion depth is too large, then cause stack over flow. Then I implement it using iterative method, it accepted.

• cool, thank you!

• Thanks! That should be the problem

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.