Archive for June 2nd, 2006
Daily Archive
Friday, June 2nd, 2006
Finding the n smallest elements in an array
Finding the n smallest elements of an array is a common problem with an informative solution. It is not necessary to sort the entire array to solve this problem. To solve it, I’m going to use histogram in a slightly non-intuitive manner (or maybe it is intuitive if you’ve read J.D. Smith’s Histogram Tutorial).
