https://leetcode.com/problems/insertion-sort-list


Runtime: 44 ms, faster than 98.82% of Python3 online submissions for Insertion Sort List.
Memory Usage: 16.5 MB, less than 12.75% of Python3 online submissions for Insertion Sort List.



```python
class Solution:
    def insertionSortList(self, head: Optional[ListNode]) -> Optional[ListNode]:
        #7:58
        l = []
        node = head
        while node:
            l.append(node.val)
            node = node.next
        l.sort()
        
        node = head
        i = 0
        while node:
            node.val = l[i]
            i += 1
            node = node.next
        
        return head
        #8:00
```