
Given an array lists of k sorted singly linked lists, merge them into one sorted linked list and return the head of the merged list. Each input list is sorted in non-decreasing order, and empty lists may appear in the input.
Example 1:
Input: lists = [[1,4,5],[1,3,4],[2,6]]
Output: [1,1,2,3,4,4,5,6]
Explanation: Merging all three sorted lists produces one fully sorted list.
Example 2:
Input: lists = []
Output: []
Explanation: There are no lists to merge, so the result is empty.
0 <= k <= 10^40 <= total number of nodes across all lists <= 10^5-10^4 <= Node.val <= 10^4