Skip to content

Latest commit

 

History

History
35 lines (27 loc) · 1.42 KB

File metadata and controls

35 lines (27 loc) · 1.42 KB

< Previous                  Next >

Related Topics

[Array] [Ordered Set] [Prefix Sum]

Hints

Hint 1 Convert lights into an array of ranges representing the range where each street light can light up and sort the start and end points of the ranges.
Hint 2 Do we need to traverse all possible positions on the street?
Hint 3 No, we don't, we only need to go to the start and end points of the ranges for each streetlight.