Teams book maintenance windows as [start, end] minute offsets (end exclusive). Merge overlapping or
touching windows ([1, 3] and [3, 5] become [1, 5]) and return the merged list sorted by start.
Then also return the total number of minutes covered.
Return {"windows": [...], "minutes": int}.
Implement merge_windows. Input: windows: list[[int, int]]. Returns: dict.
def merge_windows(windows: list[list[int]]) -> dict:
return {"windows": windows, "minutes": 0}
Run executes the public tests. Submit grades against public and hidden tests.
Teams book maintenance windows as [start, end] minute offsets (end exclusive). Merge overlapping or
touching windows ([1, 3] and [3, 5] become [1, 5]) and return the merged list sorted by start.
Then also return the total number of minutes covered.
Return {"windows": [...], "minutes": int}.
Implement merge_windows. Input: windows: list[[int, int]]. Returns: dict.
def merge_windows(windows: list[list[int]]) -> dict:
return {"windows": windows, "minutes": 0}
Run executes the public tests. Submit grades against public and hidden tests.