Minimum Interval to Include Each Query
HardLeetCodeIntervals & Sweep Line
Approach hintTry it first, then revealHide
Sort the intervals by left end and process the queries in increasing order. Push every interval that has started into a min-heap keyed by size, and discard heap tops that end before the current query.