Merge k sorted price feeds
Asked at Optiver, Jump Trading
You have k sorted lists (each ascending) and want a single sorted list of everything.
[[1, 4, 5], [1, 3, 4], [2, 6]]
-> [1, 1, 2, 3, 4, 4, 5, 6]
Merge them in where N is the total number of elements. Concatenating and re-sorting is .
Your answer
This one is open-ended. Work it through, then check your reasoning against the full solution.