Pregunta de entrevista de Block

Design an algorithm to control an elevator.