0757. Set Intersection Size At Least Two
https://leetcode.com/problems/set-intersection-size-at-least-two
Description
An integer interval [a, b]
(for integers a < b
) is a set of all consecutive integers from a
to b
, including a
and b
.
Find the minimum size of a set S such that for every integer interval A in intervals
, the intersection of S with A has a size of at least two.
Example 1:
Example 2:
Constraints:
1 <= intervals.length <= 3000
intervals[i].length == 2
0 <= ai < bi <= 108
ac
Last updated