摘要: 56. 合并区间 class Solution { public int[][] merge(int[][] intervals) { //按左边界排 相等则右边界 Arrays.sort(intervals, (o1, o2) -> { if (o1[0] == o2[0]) return Int 阅读全文
posted @ 2022-05-07 16:25 一梦两三年13 阅读(27) 评论(0) 推荐(0)
摘要: 435. 无重叠区间 class Solution { public int eraseOverlapIntervals(int[][] intervals) { //转化为找无重叠区间个数的问题 //按右边界排序 Arrays.sort(intervals, (o1, o2) -> { if (o 阅读全文
posted @ 2022-05-07 13:42 一梦两三年13 阅读(50) 评论(0) 推荐(0)