Simple and clean java code
public ListNode insertionSortList(ListNode head) {\n\t\tListNode cur = head;\n\t\tListNode dummy = new ListNode(0), p;\n\t\twhile (cur != null) {\n\t\t\t//locat
    public ListNode insertionSortList(ListNode head) {\n\t\tListNode cur = head;\n\t\tListNode dummy = new ListNode(0), p;\n\t\twhile (cur != null) {\n\t\t\t//locate the insertion position.\n\t\t\tp = dummy;\n\t\t\twhile (p.next != null &&  cur.val > p.next.val) {\n\t\t\t\tp = p.next;\n\t\t\t}\n\t\t\t//insert between p and p.next.\n\t\t\tListNode pNext = p.next;\n\t\t\tp.next = cur;\n\t\t\tListNode next = cur.next;\n\t\t\tcur.next = pNext;\n\t\t\tcur = next;\n\t\t}\n\t\treturn dummy.next;\n\t}
['Java']