Lumen Interview Question

Asked to explain about the algorithm one would use to automate the elevator.