Statement
You are given an array, lists
, containing k
singly linked lists. Each of these linked lists is individually sorted in ascending order.
Your task is to merge all k
linked lists into a single sorted linked list in ascending order and return the merged list.
Constraints:
k
lists.length
k
lists[i].length
lists[i][j]
Each
lists[i]
is sorted in ascending order.The sum of all
lists[i].length
will not exceed.