123. Find a Continuous Key Overlap
MediumIntervals
Each key is active over a half-open interval [start, end). A rotation has enough overlap at time t if at least minimum keys are active.
Return [start, end] for the longest continuous span with enough overlap. When lengths tie, keep the earliest. Return an empty list if no positive-length span qualifies.
Example 1
Input: intervals = [[1,6],[3,5],[5,9]], minimum = 2 Output: [3,6]
Example 2
Input: intervals = [[0,2],[0,2],[5,7],[5,7]], minimum = 2 Output: [0,2]
Constraints
At most 100,000 intervals. Integer endpoints satisfy 0 ≤ start < end ≤ 10⁹.1 ≤ minimum ≤ 100,000. Keys can share the same interval.