Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Interval List Intersections (Medium 986)

Given two lists of closed intervals, each list of intervals is pairwise disjoint and in sorted order.

Return the intersection of these two interval lists.

Solution:

Click here Use two pointers on intervals, return their intersection, advance pointer which end is earlier. O(n) time, O(1) space.



Installation

Run make to run python and Swift files.