Your question is Merge Overlapping Time Windows. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Given a list of closed intervals windows, where each interval is a pair [start, end] with start <= end, merge all overlapping intervals and return the resulting list sorted by start time. Two intervals overlap if the next interval's start is less than or equal to the current merged interval's end.
def merge_windows(windows):