Interval List Intersection

Merge Intervals

Problem

Given two lists of intervals, find the intersection of these two lists. Each list consists of disjoint intervals sorted on their start time.

circle-info

For example:

Input: A = [[0,2],[5,10],[13,23],[24,25]], 
       B = [[1,5],[8,12],[15,24],[25,26]]
       
Output: [[1,2],[5,5],[8,10],[15,23],[24,24],[25,25]]

Thought Process

Solution

Last updated

Was this helpful?