Skip to content
We areTOP 1%

Design an elevator system

HardConceptClassic LLD Problems
Track your progress
First attempt
Re-solve after a few days
Final pass before interviews

Answer

Model a building with several elevators that serve hall calls (up or down buttons on each floor) and car calls (floor buttons inside a car). The central problem is dispatching: choosing which elevator answers each request and in what order each car visits floors.

  • Core classes: ElevatorSystem, ElevatorController, ElevatorCar with its current floor, Direction and State enums, Request, and Button and Display components.
  • Dispatching: a DispatchStrategy picks the car, for example the nearest idle car or one already moving towards the floor in the requested direction.
  • Movement: each car follows the LOOK algorithm, serving every stop in its current direction (kept in sorted sets) before reversing, which avoids starvation.
  • Concerns: thread-safe request queues, door and weight safety, and maintenance or emergency modes.

More in Classic LLD Problems

Classic LLD Problems questions
#ProblemPlatformDifficultyOpen1st1st Visit2nd2nd VisitRevRevise
1Design a parking lot system
MediumConcept
ConceptMedium Read the answer to Design a parking lot system
2Design a vending machine
MediumConcept
ConceptMedium Read the answer to Design a vending machine
3Design an elevator system
HardConcept
ConceptHard Read the answer to Design an elevator system
4Design a movie ticket booking system
HardConcept
ConceptHard Read the answer to Design a movie ticket booking system

Sign in to track your progress

Your checkboxes, streak and activity heatmap are saved to your account and sync across devices. It is free.
Sign in with email

New here? Create an account