Merge two sorted interval lists. sort ((a, b) => a[0] -b[0]); .