← Amazon questions

Rearrange Cars to Initial Parking Slots

Filed under Amazon

Given n cars in n+1 slots, rearrange them to their target positions using the empty slot as a buffer to swap cars. Find the sequence of moves.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Amazon questions

Collected from public candidate posts and coding forums. Updated Nov 2026.