Search
⌘K

Leetcode 1603. Design Parking System

Maintain three counters for big/medium/small parking slots and implement addCar(carType) to check the corresponding counter and decrement it if available, returning true on success and false if capacity is exhausted. Operations are constant-time and counts/calls are bounded (<=1000).


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.