Merge K Sorted Lists
You are given an array of k linked-lists
lists, where each linked-list is sorted in ascending order. Your task is to merge all the linked-lists into a single sorted linked-list and return its head. Example: Input: lists = [[1,4,5],[1,3,4],[2,6]] Output: [1,1,2,3,4,4,5,6] Constraints: k == lists.length 0 <= k <= 10^4 0 <= lists[i].length <= 500 -10^4 <= lists[i][j] <= 10^4 The total number of nodes in all lists does not exceed 10^4.JavaPriority QueueLinked ListK-Way Merge
00