Podaj algorytm czasu O (N LG K), aby połączyć K list posortowanych w jedną sortowaną listę

Analysis: It takes O(k) to build the heap; for every element, it takes O(lg k) to DeleteMin
and O(lg k) to insert the next one from the same list. In total it takes O(k + n lg k) =
O(n lg k).
mos Lizard