Apple interview question

Write a simulation for elevator.