Given an array of intervals, return the minimum number of intervals to remove so the remaining intervals are non-overlapping.
[[1,2],[2,3],[3,4],[1,3]]1end timecurr.start ≥ prevEnd → keep, update prevEndKeeping the interval with the earliest end leaves maximum room for future intervals. When two overlap, we remove the one that ends later (current, since sorted by end).