1st version of in-place quicksort