Java two solutions - Pointer change and Value change
Pointer change\n\nclass Solution {\n     public ListNode insertionSortList(ListNode head) {\n         ListNode dummy = new ListNode(0);\n         ListNode curr 
**Pointer change**\n```\nclass Solution {\n     public ListNode insertionSortList(ListNode head) {\n         ListNode dummy = new ListNode(0);\n         ListNode curr = head;\n       \n         while (curr != null){\n             ListNode prev = dummy;\n            \n             while (prev.next != null && prev.next.val < curr.val)\n                 prev = prev.next;\n            \n             ListNode next = curr.next;\n             curr.next = prev.next;\n             prev.next = curr;\n             curr = next;\n         }\n        \n         return dummy.next;\n     }\n}\n```\n**Value change**\n```\n    class Solution {\n    public ListNode insertionSortList(ListNode head) {\n        ListNode cur = head;\n        while(cur != null) {            \n            ListNode start = head;\n\t\t\t\n\t\t\t// move to the position in the sorted part\n            while(start.val <  cur.val && start != cur)\n                start = start.next;\n            \n            while(start != cur.next) {\n                //swap value with current element\n                int tmp = start.val;\n                start.val = cur.val;\n                cur.val = tmp;\n                \n                start = start.next;\n            }            \n            cur = cur.next;            \n        }        \n        return head;        \n   }\n }\n```
['Java']