Apple Interview Question

Write a simulation for elevator.