You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hint 1
Try sorting the start and end points of each building.
Hint 2
The naive solution is to go through each position on the street and keep track of the sum of all the buildings at that position and the number of buildings at that position.
Hint 3
How could we optimize that solution to pass?
Hint 4
We don't need to go through every position, just the ones where a building starts or a building ends.