It cost me a few hours.

```
ListNode *reverseBetween(ListNode *head, int m, int n) {
if(head==NULL || m==n) return head;
if(m==n) return head;
int k=1;
ListNode *pNode = head;
if(m!=1){
while(k<m-1){
++k;
pNode = pNode->next;
}
pNode->next = reverse(pNode->next, n, k);
return head;
}else{
return reverse(pNode, n, --k);
}
}
ListNode *reverse(ListNode *head, int n, int &k){
++k;
if(k==n) return head;
ListNode *newHead = reverse(head->next, n,k);
ListNode *p = head->next;
head->next = p->next;
p->next = head;
return newHead;
}
```