Actually, I don't like any puzzles related with sort, I know bubble sort, quick sort, merge sort, and I don't want to write them at all, because it's a waste of time, so I directly Use the python sort method,
Oups, It works!!!. seems the leet code doesn't count the memory limit. HaHa.!!
class Solution: # @param head, a ListNode # @return a ListNode def sortList(self, head): res=; while(head): res.append(head.val); head=head.next; res=sorted(res); head=ListNode(0); resHead=head; for v in res: resHead.next=ListNode(v); resHead=resHead.next; return head.next;