Education + Jobs Hiring Website - 2025
0 like 0 dislike
229 views

The question was this word for word:

https://studyx.ai/homework/108422591-there-are-n-towers-placed-sequentially-in-the-city-of-hackerland-tower-x-is-visible-from

Eg: heights = [1,2,3,4,5]

output = [4,4,3,2,1]

How can this be solved in under O(n^2)?

It resembles https://leetcode.com/problems/number-of-visible-people-in-a-queue/description/ but not exactly.

in Online Assessments by Expert (146,210 points) | 229 views

Please log in or register to answer this question.