public ListNode insertionSortList(ListNode head) {
		if (head == null) {
			return null;
		}
		ListNode[] nodes = toArray(head);

		for (int i = 1; i < nodes.length; i++) {
			ListNode a = nodes[i];
			int j = i;
			for (; j > 0; j--) {
				ListNode b = nodes[j - 1];
				if (a.val >= b.val) {
					break;
				} else {
					nodes[j] = nodes[j - 1];
				}
			}
			nodes[j] = a;
		}

		for (int i = 1; i < nodes.length; i++) {
			ListNode a = nodes[i - 1];
			ListNode b = nodes[i];
			b.next = null;
			a.next = b;
		}

		return nodes[0];
	}