My approach is like the following. I use an array to store the sequence values from m to n of the list. then i reassign the value of these nodes with reversed values. the code is in the following. and I was confused whether my approach is in one-pass? and is there other approach that is in-place and in one-pass?

```
if(head == null || m == n)
return head;
int [] seq = new int[n-m+1];
ListNode start = head;
ListNode temp = head;
int i = 1;
while(i<m){
start = start.next;
i++;
}
temp = start;
seq[0] = temp.val;
int j=1;
while(i<n){
temp = temp.next;i++;
seq[j++] = temp.val;
}
for(j = n-m;j>=0;j--){
start.val = seq[j];
start = start.next;
}
return head;
```