quicksort while giving the user the choice to choose any pivot index