Solve a whiteboard coding problem and analyze its time and space complexity. Implement merge_intervals(intervals), which accepts a list of inclusive integer intervals [start, end] and returns a new list containing the merged intervals in ascending start order. Intervals that overlap or touch, such as [1, 3] and [3, 5], must be combined.
def merge_intervals(intervals):