Re:How to solve a hard programming interview question
by Karliss on Wednesday November 29, 2017 @02:46AM
(#15805296)
It can be done on O(nk log k) if you always merge two shortest list. If all the lists have length k initially it can be easily done with couple of loops as all the lists will have the same length - n in the beginning, 2n after fist iteration, 4n after second.
[ Parent
| on HN ]
Re:How to solve a hard programming interview question
by Karliss on Wednesday November 29, 2017 @03:14AM
(#15805413)
Here is a quick implementation https://gist.github.com/karliss/ebc27b0b2baa3e6fc0f50fadda73...