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.
Click here
Use two pointers on intervals, return their intersection, advance pointer which end is earlier. O(n) time, O(1) space.Run make to run python and Swift files.