Coding
Buildings with an Ocean View
Find all buildings that have an ocean view.
Input: heights = [1,2,3,4]
Output: [3]
Explanation: Since the ocean is to the right, only the rightmost tallest building (index 3) is not blocked by any others.
Was asked at