Hacker News new | past | comments | ask | show | jobs | submit login

The quick-select algorithm is a really simple and effective way of selecting the k-th smallest element and one that would be nice to cover. It's especially useful in situations where you need O(n) selection of the median element.



Yes. And you can unify quick-select and tree-sort (i.e. quicksort, but not in-place) in a lazy language easily in the same algorithm.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: