@Override
	public int choosePivot(int[] array) {
		int firstIndex = 0;
		int middleIndex = getMiddleIndex(array);
		int lastIndex = array.length - 1;

		int first = array[0];
		int middle = array[middleIndex];
		int last = array[array.length - 1];

		if (first < middle && first < last) {
			if (middle < last) {
				return middleIndex;
			} else {
				return lastIndex;
			}
		} else if (middle < first && middle < last) {
			if (first < last) {
				return firstIndex;
			} else {
				return lastIndex;
			}
		} else {
			if (first < middle) {
				return firstIndex;
			} else {
				return middleIndex;
			}
		}
	}