Your question is Merge Overlapping Sorted 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], merge all overlapping intervals and return a new array of non-overlapping intervals sorted by their start time. Each returned interval should cover the full range of all intervals merged into it.
def merge_intervals(intervals):