Brightest Position on Street

Medium · Intervals · about 20 minutes

Asked at Google, Amazon, Uber.

lights[i] = [position, range] lights the closed segment [position - range, position + range]. The brightness of a point is the number of segments covering it. Return the smallest point with the maximum brightness.

Related guides