Microsoft interview question

Design an algorithm for efficient operation of an elevator