Java || Easiest Approach || Explained || 3 pointers || O(1) space soln
```\nclass Solution {\n   \n    public ListNode insertionSortList(ListNode head) {\n        //making a dummy node to avoid edge cases\n        ListNode dummy  =
```\nclass Solution {\n   \n    public ListNode insertionSortList(ListNode head) {\n        //making a dummy node to avoid edge cases\n        ListNode dummy  = new ListNode(-1);\n        //  prev moves from starting to value who is just lesser than the next.val\n        ListNode prev = dummy;\n        // we use it to compare the adjacent values\n        ListNode curr =  head;\n        ListNode next = head.next;\n        dummy.next = head;\n        while(next!=null)\n        {\n            // first check , if this is true then continue \n            if(curr.val <=next.val)\n            {\n                curr =  curr.next;\n                next = curr.next;\n                continue;\n            }\n            \n            // keep moving prev as discussed \n            while(prev.next !=null && prev.next.val<next.val)\n            {\n                prev =  prev.next;\n            }\n            // inserting the lesser valued after prev, all the 3 pointers come in use \n            curr.next= next.next;\n            next.next = prev.next;\n            prev.next = next;\n            // initialising the pointer back to their required positions\n            prev = dummy;\n            next = curr.next;\n        }\n        \n        return dummy.next;\n    }\n}\n// -1 -1 5 3 4 0 \n//  p    c n\n//
['Java']