Revert "Fix worst case of quick sort"

This reverts commit 245803cb2240855183ea9767d63e78a641295592.