The examples have two properties which are not specified in the task statement
1. All intervals are of positive integers
2. The intervals are sorted by leftmost point
Is there a test that violates either or both conditions above?
If there isn't, here are some suggestions:
[(-5,-4),(-3,1)] -> [(-5,1)]
[(3,5),(4,7),(1,2)] -> [(1,7)]
[(-5,-4),(-3,1),(3,5),(4,7),(1,2)] -> [(-5,7)]
Created at: 2022/10/02 21:23; Updated at: 2022/10/10 20:56