本質上 就是線段問題,合併所有線段、找出線段的交集。可以用排序、畫圖技巧
題目
- 56 Merge Intervals (Medium)
- 57 Insert Interval (Medium)
- 986 Interval List Intersections (Medium)
- 1288 Remove Covered Intervals (Medium)
763 Partition Labels
greedy
- 435 Non-overlapping Intervals (Medium)
- 452 Minimum Number of Arrows to Burst Balloons (Medium)
- 1024 Video Stitching (Medium)
三種狀況,全交集、部分交集、沒交集