Non-overlapping windows
Your task
A courier's assigned delivery windows for one day are given as [start, end] pairs in minutes; the courier is occupied for the half-open span [start, end). The list is unsorted. Return True if a single courier can work all of them, i.e. no two windows overlap. Back-to-back windows, where one ends exactly as the next begins, are fine. Example: [[30,75],[0,30],[75,90]] is True.
Examples
can_handle_all(windows: list[list[int]]) -> boolExample 1
Input
can_handle_all([[30, 75], [0, 30], [75, 90]])Output
True