[Haskell-cafe] k-minima in Haskell
Donald Bruce Stewart
dons at cse.unsw.edu.au
Wed Apr 11 23:30:00 EDT 2007
> What's the best way to implement the following function in
> haskell: Given a list and an integer k as input return the
> indices of the least k elements in the list. The code should
> be elegant and also, more importantly, must not make more
> than the minimum O(k*length(list)) number of operations.
> R M
Is this a homework question?
More information about the Haskell-Cafe