Leetcode, Interval, Interview Questions, Google, Meta.
can use [0, 3] [2, 7] to cover the B Solution: First the intervals are sorted by the start time and for intervals with same start time sort them by higher end time first. Maintain a stack of the current possible intervals we want to use. For an interval I, if the end time is smaller than the end