← 返回 meta 的题目列表Merge Two Interval Lists
类型:online_judge
Given two sorted lists of intervals, merge these two lists into one non-overlapping interval list. Each interval is represented by two integers, a start value and an end value, and the resulting list should be sorted by start values with no overlaps. Implement a function to perform the merge operation.
Input
First list: List[List[int]] representing the first sorted interval list.
Second list: List[List[int]] representing the second sorted interval list.
Output
List[List[int]] representing the merged interval list.
Sample Input
intervals1 = [[1, 3], [5, 6], [8, 10]]
intervals2 = [[2, 4], [7, 9]]
Sample Output
[[1, 4], [5, 6], [7, 10]]
Example
Input
intervals1 = [[1, 3], [5, 6], [8, 10]]
intervals2 = [[2, 4], [7, 9]]