Design an elevator control system

Read the full interview experience this question came from →

Quick Overview

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

Company: Google

Role: Software Engineer

Category: System Design

Difficulty: hard

Interview Round: Onsite

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.

Overview: 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.

Read the full Google Software Engineer interview experience this question came from

|Home/System Design/Google
Google logo
Google
Sep 6, 2025
hardSoftware EngineerOnsiteSystem Design
20
0

Elevator Control System Design (N floors, M elevators)

Context

You are designing a multi-elevator control system for a building with N floors (1..N) and M elevators. Users generate two types of requests:

  • Hall calls: from a floor, pressing Up or Down to request pickup.
  • Car calls: inside an elevator, pressing a destination floor for dropoff.

Assume each elevator has sensors for door state, weight/load, current floor/position, and fault signals.

Requirements

  1. Model core classes and entities:
    • Elevator, Door, Floor, Request (HallCall, CarCall), Controller, Scheduler.
  2. Define key methods and interfaces:
    • requestPickup(floor, direction)
    • requestDropoff(floor)
    • step()/tick()
    • getStatus()
  3. Choose and justify a scheduling strategy (e.g., nearest-car, SCAN/LOOK/collective-control, hybrid).
  4. Describe state machines and transitions for elevator and door.
  5. Handle concurrency and multiple simultaneous requests.
  6. Address priority and fairness (avoid starvation, balance load).
  7. Error handling and safety (overload, door obstruction, stuck elevator, out-of-service).
  8. Extensibility and service modes (e.g., VIP, fire service, maintenance).
  9. Provide class interfaces or language-agnostic pseudocode for main operations.

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...