Optimal Algorithmic Approach
Sort by end time + greedy selection.
Core Invariants & Edge Cases
- Sort by end time (greedy: keep interval with earliest end)
- Greedily select intervals that don't overlap with the last selected
- Count removed = total - kept