Fewest bookings to cancel
Each booking of a single room is a pair [start, end] with start < end. Two bookings clash when their times overlap; one that starts exactly when another ends does not clash. Return the fewest bookings you must cancel so that no two of the remaining ones clash.
The list is not sorted, may be empty and may contain identical bookings.
Besides the tests, one large input (4,000 bookings) with a ~300 ms limit (scaled to your device's speed): brute force won't pass.
Examples
min_cancellations([[1,3],[2,4],[3,5]])→1min_cancellations([[1,10],[2,3],[4,5],[6,7]])→1min_cancellations([[1,2],[2,3],[3,4]])→0