Search⌘ K
AI Features

Number of Visible People in a Queue

Number of Visible People in a Queue asks you to count, for each person, how many people to the right are visible when everyone between them is shorter than both.

Statement

You are given an array heights representing n people standing in a queue, numbered from 0 to n - 1 from left ...