2385. Count Positions on Street With Required Brightness

Medium
Array
Prefix Sum

Description

Hints

Hint 1
How can we find the brightness at every position on the street?
Hint 2
We can use a hash table to store the change in brightness from the previous position to the current position.

Statistics

Acceptance
63.1%
Submissions
8,242
Accepted
5,199