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
Good morning! Here's your coding interview problem for today.
This problem was asked by Microsoft.
Let X be a set of n intervals on the real line. We say that a set of points P "stabs" X if every interval in X contains at least one point in P. Compute the smallest set of points that stabs X.
For example, given the intervals [(1, 4), (4, 5), (7, 9), (9, 12)], you should return [4, 9].
The text was updated successfully, but these errors were encountered:
Good morning! Here's your coding interview problem for today.
This problem was asked by Microsoft.
Let
X
be a set ofn
intervals on the real line. We say that a set of pointsP
"stabs"X
if every interval inX
contains at least one point inP
. Compute the smallest set of points that stabsX
.For example, given the intervals
[(1, 4), (4, 5), (7, 9), (9, 12)]
, you should return[4, 9]
.The text was updated successfully, but these errors were encountered: