k-th smallest across sorted lists
lists is a list of sorted lists. Write kth_smallest(lists, k) that returns the k-th
smallest value across all of them, counting repeats, with k = 1 the smallest. k is at
most the total count.
kth_smallest([[1, 5, 9], [2, 3], [4]], 4) -> 4
kth_smallest([[1, 1], [1]], 3) -> 1
The point is to practise the k-way merge with a heap, stopping after k pops.
def kth_smallest(lists, k):
...