News for hackers. Stuff that matters.
Re:Damn Cool Algoritms: BK-Trees by stromhold on Wednesday March 03, 2010 @12:11PM (#1164541)
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.
Re:Damn Cool Algoritms: BK-Trees by eru on Thursday March 04, 2010 @12:27PM (#1167443)
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.