Merge k Sorted Lists
Problem
Merge k sorted linked lists and return it as one sorted list.
Analyze and describe its complexity.
Example
Given lists:
[
2->4->null,
null,
-1->null
],
return -1->2->4->null
.
Merge k sorted linked lists and return it as one sorted list.
Analyze and describe its complexity.
Given lists:
[
2->4->null,
null,
-1->null
],
return -1->2->4->null
.