public static void quickSort2(int[] array, int[] array2, int lowIndex,
			int highIndex) {
		// this.printArray();
		// System.out.println("low:high="+lowIndex+":"+highIndex);
		if (lowIndex >= highIndex)
			return;

		count2 += (highIndex - lowIndex);

		int i = lowIndex + 1;
		int pivot = choosePivot(array, lowIndex, highIndex);
		int pivot2 = choosePivot(array2, lowIndex, highIndex);

		int tmp = 0;
		int tmp2 = 0;

		for (int j = lowIndex + 1; j <= highIndex; j++) {
			count++;
			// compare array[j] and pivot, see if needs swap
			if (array[j] < pivot) {
				// if there is nothing <p yet, then just move i forward;
				if (i != j) {
					// swap array[j] and array[i] unless there is nothing
					// smaller than pivot yet
					tmp = array[j];
					array[j] = array[i];
					array[i] = tmp;

					tmp2 = array2[j];
					array2[j] = array2[i];
					array2[i] = tmp2;
				}
				i++;
			}
		}

		// swap pivot and array[i-1]
		tmp = array[i - 1];
		array[i - 1] = pivot;
		array[lowIndex] = tmp;

		// swap pivot and array[i-1]
		tmp2 = array2[i - 1];
		array2[i - 1] = pivot2;
		array2[lowIndex] = tmp2;

		// element i-1 is the pivot, doesn't need to sort.
		quickSort2(array, array2, lowIndex, i - 2);
		quickSort2(array, array2, i, highIndex);
	}