2
public int[] smallestRange(List<List<Integer>> nums) {3
int[] res = {-100000, 100000};4
PriorityQueue<int[]> pq = new PriorityQueue<>((a, b) -> a[0] - b[0]);5
int max = Integer.MIN_VALUE;8
for (int i = 0; i < k; i++) {9
int minElem = nums.get(i).get(0);10
int[] arr = {minElem, 0, i};12
max = Math.max(max, minElem);16
int min[] = pq.poll();17
if (res[1] - res[0] > max - min[0]) {23
List<Integer> cur = nums.get(min[2]);25
if (min[1] == cur.size()) {28
min[0] = cur.get(min[1]);29
max = Math.max(max, cur.get(min[1]));