Smallest range covering all k lists
Asked at Two Sigma, Jane Street
You have k sorted lists of numbers. Find the smallest range [a, b] (smallest b - a, ties broken by smaller a) that contains at least one number from each of the k lists.
[4, 10, 15, 24, 26]
[0, 9, 12, 20] -> [20, 24]
[5, 18, 22, 30]
Target time for total elements, memory.
Your answer
This one is open-ended. Work it through, then check your reasoning against the full solution.