Katkat

Design an elevator control system

GoogleSoftware Engineer · Onsite

Last updated

This question evaluates system design skills including architectural modeling of components, scheduling and concurrency control, state-machine design, and fault-tolerance for real-time control systems, and falls under the System Design domain.

Design an elevator control system for a building with N floors and M elevators. Model the core classes (e.g., Elevator, Request, Controller, Door, Floor), define key methods (e.g., requestPickup(floor, direction), requestDropoff(floor), step()/tick(), getStatus()), and choose a scheduling strategy (e.g., nearest-car or SCAN). Discuss state transitions, handling concurrent requests, priority and fairness, error cases (overload, stuck elevator), extensibility (service modes), and provide class interfaces or pseudocode for the main operations.