3 ms·
Quickselect. Very elegant, fast and solves the problem. I'm surprised many people don't know about it. https://en.m.wikipedia.org/wiki/Quickselect https://en.m
by vagab0nd 8y ago
Quickselect. Very elegant, fast and solves the problem. I'm surprised many people don't know about it.
https://en.m.wikipedia.org/wiki/Quickselect https://en.m.wikipedia.org/wiki/Quickselect
- gct 8y agoIn the tradition of naming things terribly this is called std::nth_element in C++