in-place quick sort