Updated Quicksort with in-place algorithm