← Questions
Count visible people in a line
0
I was asked this
No reports yet. Sign in to say where you were asked it.
People stand in a line and heights[i] is the height of the person at position i. Two people can see each other when nobody standing between them is taller than both of them.
First return how many people the last person in the line can see. Then return that count for every position.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding
