Array
1288. Remove Covered Intervals
An interval [a,b] is covered by [c,d] if c ≤ a and b ≤ d; remove every interval covered by another and return how many remain. The right sort turns this into a single-variable greedy: sort by left…
Loading…
An interval [a,b] is covered by [c,d] if c ≤ a and b ≤ d; remove every interval covered by another and return how many remain. The right sort turns this into a single-variable greedy: sort by left…
Loading…