Fix wost-case of quick sort