You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the 1D multi-hitting set problem. Use greedy, wlog assume that no interval contain another, and sort the intervals according to left endpoint in increasing order. Process the intervals one by one, greedily choose the rightmost points that fulfill the requirement. O(sort(n)).