Re:Data structures and algorithms problems in C++ using STL
by gpderetta on Friday March 10, 2017 @12:13PM
(#13840113)
and median of medians can be used to implement quicksort with O(NlogN) worst case. It is usually not worth it as other hybrid quicksorts like introsort are faster in practice.
On an unrelated note, I was once asked to prove the upper bound for median of median on an interview...
It's hairier than a partial quicksort, but (if you erase the proof and weigh the chalk dust) guaranteed linear time.