Implement getElevator() and nextFloor() for a multi-elevator system
Given a list of elevators, each with a current floor and direction, implement two methods: getElevator(userFloor, destinationFloor) that selects the best elevator to serve a user on a given floor, and nextFloor() that advances an elevator to its next destination floor.
Asked at:
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Mid July, 2025
Senior
Hello Interview Premium
Your account is free and you can post anonymously if you choose.