On 22/10/09 15:31, Paul Johnson wrote: > > > takeLargest k = take k . sort > > Because "sort" is lazily evaluated this only does enough sorting to > find the first k elements. I guess the complexity is something like > O(n*k*log(k)). > Correction: O(n*log(k))