[Haskell-cafe] k-minima in Haskell

raghu vardhan mrvr84 at yahoo.co.in
Wed Apr 11 23:28:33 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.


      Send a FREE SMS to your friend's mobile from Yahoo! Messenger. Get it now at http://in.messenger.yahoo.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20070412/c1bf0945/attachment.htm

More information about the Haskell-Cafe mailing list