Search
⌘K

Leetcode 1288. Remove Covered Intervals

Given a list of half-open intervals [l, r), remove any interval that is fully contained within another (c ≤ a and b ≤ d) and return the count of remaining intervals. A common approach is to sort by start (and end descending on ties) and sweep while tracking the farthest end to detect covered intervals.

Asked at:

Google

Google


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Mid September, 2024

Google

Google

Mid-level

Given two sets of intervals S and T, find the minimum subset of T such that all intervals of S are covered

Comments

Your account is free and you can post anonymously if you choose.