문제
Given an array of intervals
intervals
where intervals[i] = [start
i
, end
i
]
, return the minimum number of intervals you need to remove to make the rest of the intervals non-overlapping.Example 1:
Example 2:
Example 3:
Constraints:
1 <= intervals.length <= 10
5
intervals[i].length == 2
5 * 10
4
<= start
i
< end
i
<= 5 * 10
4
풀이
효성
- end 값으로만 정렬해도 되는 이유 : end를 기점으로 start가 값이 무엇이든 잘리게 되어있음.