You are given an array of k linked lists, each sorted in ascending order. Merge all the linked lists into one sorted linked list and return it.
lists[0]: 1 -> 4 -> 5 lists[1]: 1 -> 3 -> 4 lists[2]: 2 -> 6
Input: lists = [[1,4,5],[1,3,4],[2,6]] Output: [1,1,2,3,4,4,5,6] Explanation: Merging the three sorted lists produces one sorted list with all elements.
Input: lists = [] Output: [] Explanation: No lists to merge, so the result is empty.
lists = [[1, 4, 5], [1, 3, 4], [2, 6]]