I have implemented a working quickSort algorithm using the first element in the array as the pivot, that look like this:
public int[] quickSort( int[] a, int st
You could simply swap the pivot you chose with the first element in the array before you start sorting, that way it'll work exactly as before.
int l = start; int r = end; this.swap(a, choosePivot(), start); int pivotIndex = start;