...

/

Solution: Interval List Intersections

Solution: Interval List Intersections

Let's solve the Interval List Intersections problem using the Merge Intervals pattern.

Statement

For two arrays of closed intervals given as input, intervalListA and intervalListB, where each interval has its own start and end time, write a function that returns the intersection of the two interval arrays.

For example, the intersection of [3,8][3, 8] and [5,10][5, 10] is [5,8][5, 8].

Constraints

  • 0 ...

Access this course and 1400+ top-rated courses and projects.