Search
⌘K

Leetcode 3168. Minimum Number of Chairs in a Waiting Room

Given a string of events where 'E' means a person enters and 'L' means a person leaves (starting from empty), compute the peak number of simultaneous people by simulating the events to return the minimum chairs required. This is a simple linear scan tracking current occupancy and its maximum.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.