Class Solution
java.lang.Object
g0401_0500.s0435_non_overlapping_intervals.Solution
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
eraseOverlapIntervals
(int[][] intervals) This is sorting my starting time, the key here is that we'll want to update end time when an erasure is needed: we use the smaller end time instead of the bigger one which is more likely to overlap with others.
-
Constructor Details
-
Solution
public Solution()
-
-
Method Details
-
eraseOverlapIntervals
public int eraseOverlapIntervals(int[][] intervals) This is sorting my starting time, the key here is that we'll want to update end time when an erasure is needed: we use the smaller end time instead of the bigger one which is more likely to overlap with others.
-