Crusoe infrastructure telemetry can arrive as multiple independently ordered streams of active time ranges. Given several streams of intervals, return one consolidated list containing all overlapping intervals across every stream.
Each interval is represented as [start, end], where start <= end. Every input stream is sorted by start, but intervals within a stream may overlap. Treat intervals that touch, such as [1, 3] and [3, 5], as overlapping and merge them.
Use a k-way merge with a min-heap rather than concatenating all streams and sorting them globally.
Implement merge_interval_streams(streams), where streams is a list of sorted lists of integer intervals. Return a list of disjoint intervals sorted by start time. Return [] when all streams are empty.
def merge_interval_streams(streams):