Ezvor

2237. Count Positions on Street With Required Brightness

MediumArray Preparing judge… LeetCode
ArrayPrefix Sum

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.