Interval List Intersections

Medium
Arrays Array Two Pointers

Given two sorted interval lists, find their intersections.

Constraints

0 ≤ lengths ≤ 1000

Examples

Example 1:
Input: 0 2 5 10 13 23 24 25 1 5 8 12 15 24 25 26
Output: 1 2 5 5 8 10 15 23 24 24 25 25
▲ Console

Install Talent Arabia

Get instant access to jobs and career tools on your device.