16 August 2026
Common Free Time
Hard
Lists
Find every overlap between two people’s available time slots.
You are given two availability lists, first and second. Each list contains intervals [start, end] sorted by start time, and intervals in one list do not overlap. Return every interval where both people are available. An interval [start, end] includes times from start up to, but not including, end. Only return an overlap when its start is smaller than its end.
Constraints
Each interval is [start, end] where start < end.Intervals in each input list are sorted and do not overlap.0 <= len(first), len(second) <= 200.
Function signature
def common_free_time(first: list[list[int]], second: list[list[int]]) -> list[list[int]]: