quick sort 3 way