j
k
j a
j l
G'day all. Quoting apfelmus :
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
Back to the thread
Back to the list