For God's sake, don't try sorting a linked list during the interview
\nclass Solution {\npublic:\n    ListNode* insertionSortList(ListNode* head) {\n        vector<int> nums;\n        ListNode* temp = head;\n        while(temp !=
```\nclass Solution {\npublic:\n    ListNode* insertionSortList(ListNode* head) {\n        vector<int> nums;\n        ListNode* temp = head;\n        while(temp != NULL){\n            nums.push_back(temp->val);\n            temp = temp->next;\n        }\n        \n        sort(nums.begin(), nums.end());\n        temp = head;\n        int i = 0;\n        while(temp != NULL){\n            temp->val = nums[i++];\n            temp = temp->next;\n        }\n        return head;\n    }\n};\n```
['Linked List', 'C', 'C++']