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
62.7%
Submissions
7,844
Accepted
4,922