15 Lines Java Solution Using DummyHead
\n    public ListNode insertionSortList(ListNode head) {\n        ListNode dummy = new ListNode(0); // use dummyHead\n        ListNode cur = head;\n        whil
```\n    public ListNode insertionSortList(ListNode head) {\n        ListNode dummy = new ListNode(0); // use dummyHead\n        ListNode cur = head;\n        while (cur != null) {\n            ListNode iter = dummy; // find the correct insertion point\n            while (iter.next != null && iter.next.val < cur.val) {\n                iter = iter.next;\n            }\n            ListNode next = cur.next;\n            cur.next = iter.next;\n            iter.next = cur;\n            cur = next;\n        }\n        return dummy.next;   \n    }\n```
[]