Interval List Intersections
Try to solve the Interval List Intersections problem.
We'll cover the following
Statement
For two lists 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 lists.
For example, the intersection of $[3, 8]$ and $[5, 10]$ is $[5, 8]$.
Constraints:

$0 \leq$
intervalLista.length
,intervalListb.length
$\leq 1000$ 
$0 \leq$
start[i]
$<$end[i]
$\leq 10^9$, where $i$ is used to indicateintervalLista

end[i]
$<$start[i + 1]

$0 \leq$
start[j]
$<$end[j]
$\leq 10^9$, where $j$ is used to indicateintervalListb

end[j]
$<$start[j + 1]
Examples
Create a free account to view this lesson.
By signing up, you agree to Educative's Terms of Service and Privacy Policy