โ† Amazon questions

Minimum Elevator Steps to Reach Floor B

Filed under Amazon

Given a building with N floors, find the minimum number of button presses to get from floor A to floor B, with an elevator that moves up X floors or down Y floors.

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.