Skip to main content
Admissions guidance, study banks, and career tools — get started on Shalyam

Design Parking System

A parking lot has a given number of big, medium and small spaces. addCar type (1 = big, 2 = medium, 3 = small) parks a car in a space of its own type if one is free. Print true or false for every addCar.

Constraints

0 <= spaces <= 1000 1 <= q <= 1000

Discussion

No discussions yet.

Rewards · v2.1

Get Exclusive Insights with Every Issue

Join Shalyam Newsletter

Stay ahead in education, research, and innovation—straight to your inbox.