Merge K Sorted Arrays
Description
Example
Input:
[
[1, 3, 5, 7],
[2, 4, 6],
[0, 8, 9, 10, 11]
]
Output: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]Input:
[
[1,2,3],
[1,2]
]
Output: [1,1,2,2,3]Challenge
Solution
LintCode official - Heap (Priority Queue)
Divide and Conquer
Last updated