Question 1
Medium Visible people in a line: given an array of heights representing people standing from left to right, return the number of other people the last person can see. Two people can see each other if no person between them is strictly taller than both of them. The last person looks only to the left and does not count themselves. Example: [1, 10, 6, 7, 9, 8, 2, 4, 3, 5] gives 6, because the person of height 5 can see the people of heights 3, 4, 2, 8, 9, and 10.