← 返回 meta 的题目列表Merge K Sorted Linked Lists into One Sorted List
类型:online_judge
meta
Merge k sorted linked lists. Given k sorted linked lists, merge them into one sorted linked list and return its head.
Example
Input:[
1->4->5,
1->3->4,
2->6
]
Output:1->1->2->3->4->4->5->6
Constraints
The total number of elements in all linked lists is in the range [0, 10^4].
k is in the range [0, 100].
Example
Input
[1->4->5, 1->3->4, 2->6]