This is LeetCode problem 23: merge K sorted array.
The solution is to use heap to merge sub array.
I provide three kinds of solution. Use the second solution to pass LeetCode.
Post a Comment
No comments:
Post a Comment