Practice
Learn
← Quit
0 / 0 correct
Algorithms
Hard
1 of 40
How do you merge k sorted lists of total size n efficiently?
A
Concatenate and sort: O(n log n) always better
B
Merge pairs sequentially one at a time: O(nk)
C
Binary search each element
D
A min-heap holding the current head of each list: O(n log k)