Clean Java solution using a fake head
public ListNode insertionSortList(ListNode head) {\n      ListNode curr = head, next = null;\n      // l is a fake head\n      ListNode l = new ListNode(0);\n  
    public ListNode insertionSortList(ListNode head) {\n      ListNode curr = head, next = null;\n      // l is a fake head\n      ListNode l = new ListNode(0);\n      \n      while (curr != null) {\n        next = curr.next;\n        \n        ListNode p = l;\n        while (p.next != null && p.next.val < curr.val)\n          p = p.next;\n        \n        // insert curr between p and p.next\n        curr.next = p.next;\n        p.next = curr;\n        curr = next;\n      }\n      \n      return l.next;\n    }
['Java']