10 line clean and easy-to-understand C++ solution
Please see [my blog post][1] for more.\n\n    ListNode insertionSortList(ListNode head) {\n        ListNode dummy(INT_MIN);\n        ListNode prev, cur, *next;\
Please see [my blog post][1] for more.\n\n    ListNode *insertionSortList(ListNode *head) {\n        ListNode dummy(INT_MIN);\n        ListNode *prev, *cur, *next;\n        \n        for (auto p = head; p; p = next) {\n            next = p->next;\n            // invariant: list headed by dummy.next is sorted\n            for (prev = &dummy, cur = prev->next; cur && p->val > cur->val; prev = cur, cur = cur->next)\n                ;\n            prev->next = p;\n            p->next = cur;\n        }\n        \n        return dummy.next;\n    }\n\n  [1]: http://xiaohuiliucuriosity.blogspot.com/2015/02/insertion-sort-list.html
['Linked List', 'Sorting']