Search⌘ K
AI Features

Data Stream as Disjoint Intervals

Understand how to summarize a continuous stream of non-negative integers into disjoint intervals. Learn to implement a class that adds numbers to the stream, merges overlapping intervals, and returns the current list of disjoint intervals sorted by their start values.

Statement

You are given a stream of non-negative integers ...