Buildings With an Ocean View
CodingOnsiteSoftware EngineerReported Apr, 2026
Company question banks are included with the Insider plan.
There are n buildings in a line. You are given an integer array heights of size n that represents the heights of the buildings in the line.
The ocean is to the right of the buildings. A...