← Amazon questions

Race Car minimum instructions problem

Filed under Amazon

Your car starts at position 0 and speed +1 on an infinite number line. Your car goes to position target by repeatedly getting an instruction: 'A' (accelerate: position += speed, speed *= 2) or 'R'…

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.