```
public ListNode reverseListNode(ListNode head, int len){
if(len > 1){
ListNode p = head, prev = new ListNode(-1);
while(len > 0){
int count = 1;
boolean isHead = true;
prev.next = p = head;
while(p.next != null && count < len){
ListNode q = p.next;
p.next = q.next;
q.next = p;
prev.next = q;
prev = prev.next;
if(isHead){
isHead = false;
head = q;
}
count ++;
}
len--;
}
}
return head;
}
public ListNode reverseBetween(ListNode head, int m, int n) {
if(head == null || head.next == null) return head;
int i = 1;
ListNode p = head;
while(i < m){
p = p.next;
i++;
}
ListNode ln = reverseListNode(p, n);
if(m == 1)
head = ln;
return head;
}
```

I don’t get that why my code got Memory Limited Exceed... the issue may be in the function of **reverseListNode**.