Class Solution


  • public class Solution
    extends Object
    • Constructor Detail

      • Solution

        public Solution()
    • Method Detail

      • 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.