Merge Intervals: Introduction
Let’s go over the Merge Intervals pattern, its real-world applications, and some problems we can solve with it.
We'll cover the following
About the pattern
The merge intervals pattern deals with problems involving overlapping intervals. Each interval is represented by a start and an end time. For example, an interval of
The key to understanding this pattern and exploiting its power lies in understanding how any two intervals may overlap. The illustration below shows different ways in which two intervals can relate to each other: