DrawingSkyline memory efficiency

#1

Hi,

Won’t the given solution for the DrawingSkyline problem run OOM if the total width of all buildings is very large, because assigning a slot (containing max height) of every point between the start and end of the building is not memory efficient.

For e.g., [[0,2147483647,2147483647]] will cause it to try and create a very large heights array.

0 Likes