Added a inplace version of quicksort