Problem 56 · Medium

Merge Intervals

Merge overlapping intervals and return the non-overlapping result. The visual sorts intervals by start and extends the current block while the next interval overlaps it.

Open the interactive visualisation