3 ms·
If you're familiar with the linear time deterministic selection algorithm, this is straightforward to solve. It's usually taught in intro to algorithms classes.
by sweis 17y ago
If you're familiar with the linear time deterministic selection algorithm, this is straightforward to solve. It's usually taught in intro to algorithms classes. See CLRS chapter 9.
Incidentally, the algorithm is from 1973 and four of the authors went on to win the Turing award: ftp://db.stanford.edu/pub/cstr.old/reports/cs/tr/73/349/CS-TR-73-349.pdf