public ListNode insertionSortList(ListNode head) {
        if (head == null) return null;
        if (head.next == null) return head;
        ListNode pre = head, cur = head.next;

        int count = 1;
        outter:
        while (cur != null) {

            ListNode node = head;
            ListNode prenode = null;

            for (int i = 0; i < count; i++) {
                if (cur.val < node.val) {
                    pre.next = cur.next;
                    if (node == head) {
                        cur.next = head;
                        head = cur;
                    } else {
                        prenode.next = cur;
                        cur.next = node;
                    }
                    cur = pre.next;
                    count++;
                    continue outter;
                }
                prenode = node;
                node = node.next;
            }
            pre = cur;
            cur = cur.next;
            count++;
        }

        return head;
    }