median3 selection of quick sort