← All problemsSign in

The AUK Parking Garage

The AUK Parking Garage contains a single lane that holds up to $N$ cars. There is only a single entrance/exit at one end of the lane. If a customer arrives to pick up a car that is not nearest the exit, all cars blocking its path are moved out. The customer’s car is driven out and the other cars are restored in the same order that they were in originally. Given the order in which the cars arriv

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start