G'day all.

Quoting apfelmus <[EMAIL PROTECTED]>:

> You mean O(k * log n + n) of course.

Erm, yes.  You can do it in an imperative language by building a heap
in O(n) time followed by removing k elements, in O(k log n) time.

Cheers,
Andrew Bromage
_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to