← Amazon questions

Calculate distance after steps on coordinate plane

Filed under Amazon

Given a friend's house position at (x,y) and a person starting at (0,0) moving only on the x-axis by doubling steps in alternating directions every second for n seconds, find the final distance…

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.