public static int partition(Comparable[] a, int lo, int hi) {
		Comparable v = a[lo];
		int i = lo;
		int j = hi + 1;
		while (true) {
			while (less(a[++i], v)) {
				if (i == hi) {
					break;
				}
			}
			while (less(v, a[--j])) {
				if (j == lo) {
					break;
				}
			}
			if (i >= j) {
				break;
			}
			exch(a, i, j);
		}

		exch(a, lo, j);
		return j;
	}