Build the PrimitiveMedium
Non-overlapping Intervals
Write `erase_overlap_intervals(intervals)` returning the minimum number of intervals to remove so the rest do not overlap. Intervals that merely touch do not overlap.
[[1,2],[2,3],[3,4],[1,3]] -> 1
This is interval scheduling, and the greedy that works sorts by **end** time: always keep the interval that frees up soonest, because it leaves the most room for everything after it. Sorting by start is the natural instinct and it is wrong — say which you chose and why.
What to expect: A timer starts when you begin. Edit the starter code, run it against the test suite as many times as you like, then finish when you're done. The reference solution and interviewer follow-up questions unlock only after you finish.