Shopee's checkout interface receives delivery windows from multiple logistics providers. Given a list of time intervals, merge every overlapping or directly adjacent window so the UI can display a compact schedule.
Implement merge_delivery_windows(intervals). The input is a list of integer pairs [start, end], where start <= end. Return a new list of non-overlapping intervals sorted by start time. Two intervals should be merged when the next interval starts at or before the current interval's end. Do not modify the input list.
def merge_delivery_windows(intervals):