Microsoft Interview Question

Design an algorithm for efficient operation of an elevator