Epic Interview Question

How would you implement an algorithm for elevator?