Java || Easy || Dummy
Please Upvote if you understood this (\uFF5E\uFFE3\u25BD\uFFE3)\uFF5E\n\nclass Solution {\n    public ListNode insertionSortList(ListNode head) {\n        ListN
## **Please Upvote if you understood this** (\uFF5E\uFFE3\u25BD\uFFE3)\uFF5E\n```\nclass Solution {\n    public ListNode insertionSortList(ListNode head) {\n        ListNode curr = head;\n        ListNode dummy = new ListNode(0);\n        ListNode prev = dummy;\n        ListNode nex = curr.next;\n        \n        while(curr!=null){\n                while(prev.next != null && prev.next.val < curr.val) prev = prev.next;\n                curr.next = prev.next;\n                prev.next = curr;\n                \n                curr = nex;\n                if(curr!=null) nex = curr.next;\n                prev = dummy;\n               \n        }\n        \n        return dummy.next;\n    }\n}\n```
['Java']