I have a Time Limit Exceeded when input a list of 5000 numbers.

```
class Solution:
# @param head, a ListNode
# @return a ListNode
def insertSort(self, head):
if head==None or head.next==None:
return head
self.insertSort(head.next)
l=head
r=head.next
while r!=None:
if l.val>r.val:
l.val,r.val=r.val,l.val
l=r
r=r.next
else:
return head
return head
def insertionSortList(self, head):
return self.insertSort(head)
```

is there any solution for the problem?