Skip to content

Latest commit

 

History

History
7 lines (4 loc) · 325 Bytes

README.md

File metadata and controls

7 lines (4 loc) · 325 Bytes

This problem was asked by Snapchat.

Given a list of possibly overlapping intervals, return a new list of intervals where all overlapping intervals have been merged.

The input list is not necessarily ordered in any way.

For example, given [(1, 3), (5, 8), (4, 10), (20, 25)], you should return [(1, 3), (4, 10), (20, 25)].