leetle

Daily challenge for 2026-03-30

454. Overlapping Interval Summation

Given a list of closed intervals, where each interval is represented by a pair of integers [start, end], find the total length covered by the union of all these intervals. The intervals may overlap.

Example:
Input: intervals = [[1, 4], [3, 6], [8, 10]]
Output: 7

Explanation: The union of [1, 4] and [3, 6] is [1, 6], which has a length of 5. Adding [8, 10] (length 2) results in a total covered length of 5 + 2 = 7.

Run this challenge interactively in Python or JavaScript when the app loads.