Easy Solution || Beats 96.63% of users with C++
Upvote\n\n# Code\n\n\nclass Solution {\npublic:\n    ListNode* insertionSortList(ListNode* head) {\n        vector<int>v;\n        while(head!=NULL){\n         
# Upvote\n\n# Code\n```\n\nclass Solution {\npublic:\n    ListNode* insertionSortList(ListNode* head) {\n        vector<int>v;\n        while(head!=NULL){\n         v.push_back(head->val);\n         head=head->next;\n\n        }\n        sort(v.begin(),v.end());\n        ListNode* temp=new ListNode(0);\n        ListNode* temp1=NULL;\n        for(int i=v.size()-1;i>=0;i--){\n            temp=new ListNode(v[i]);\n            temp->next=temp1;\n            temp1=temp;\n        }\n        return temp1;\n    }\n};\n```
['Linked List', 'Sorting', 'C++']