Your question is Merge Overlapping Time Intervals. 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 an array of intervals intervals, where each interval is a two-element array [start, end] and start <= end, merge all overlapping intervals and return a new array of non-overlapping intervals covering the same ranges. The output may be returned in sorted order by start time.
def merge_intervals(intervals):