Clinic #29: Non-overlapping Intervals

A catalogue of ways to attack a problem. Its greedy panel says the rule out loud: take the locally best choice, never look back, and prove the choice safe. This clinic is that proof, done once by hand on a real problem.
Before you start. Clinic #28: Merge Intervals took a pile of road closures, sorted them by where they start, and walked the road once, widening one sign at a time; if you have not read it, the one thing to carry over is that an interval is a start and an end, like “km 2 to km 6”. Sorting costs a little more than one pass, written O(n log n), and trying every subset of n things costs O(2ⁿ), which doubles with each item you add; Sorting & Searching shows where the first one comes from.