Combine Overlapping Ranges

Asked at Apple · Coding Questions · Difficulty: Medium · Last asked Jun 24, 2026

Given a collection of closed intervals, combine every group of intervals that overlap into a single interval, so that the result covers the same points with no overlaps.

Loading the problem…