FromLeetcodeStatus太难了不会DateMar 27, 2024Tags贪心算法Difficulty中等Linkhttps://leetcode.cn/problems/non-overlapping-intervals/description/题面给定一个区间的集合 intervals ,其中 intervals[i] = [starti, endi] 。返回 需要移除区间的最小数量,使剩余区间互不重叠 。示例 1:示例 2:示例 3:提示:1 <= intervals.length <= 105intervals[i].length == 25 * 104 <= starti < endi <= 5 * 104 思路重叠时保留右边界更小的(移除右边界更大的),减少后续重叠可能题解