private List sort(List list) {
		if (list.head == list.tail) {
			return list;
		}
		ListNode parti = list.head;
		List left = null;
		List right = null;
		ListNode currentNode = list.head.next;
		while (currentNode != null) {
			if (currentNode.val <= parti.val) {
				if (left == null) {
					left = new List(currentNode);
				} else {
					left.appendTail(currentNode);
				}
			} else {
				if (right == null) {
					right = new List(currentNode);
				} else {
					right.appendTail(currentNode);
				}
			}
			currentNode = currentNode.next;
		}
		List result = null;
		if (left != null) {
			left = sort(left);
			result = new List(left.head, left.tail);
		}
		if (result != null) {
			result.appendTail(parti);
		} else {
			result = new List(parti);
		}
		if (right != null) {
			right = sort(right);
			result.appendTail(right);
		}
		return result;
	}