Learning on Web Dev Open is free for all.

Interview Prep · Low Level DesignDesign an elevator system
← Low Level Design

Design an elevator system

Medium45 minFree, no account

Two kinds of request, four elevators, and a scheduling policy you have to defend.


The question

Design the control system for a bank of four elevators in a twenty-storey building.

Be specific about how a hall call is assigned and what happens to a car already in motion.

Functional
  • Hall calls (a floor, a direction) and car calls (inside, a destination).
  • Assign hall calls to a car; cars serve their stops efficiently.
  • Doors open, hold, and close; obstruction reopens them.
  • Emergency stop and maintenance mode.
Non-functional
  • No request is ignored indefinitely.
  • Scheduling policy swappable without touching car control.
45:00Commit to an answer before you open the solution. Reading it first teaches you to recognise good answers, which is not the skill being tested.

Stuck?

0 of 3 hints taken

The worked solution

written by a person · not a grade

Score yourself

0 of 5 marked
  • Separated hall calls from car calls and dispatch from car control25
  • Gave a per-car scheduling algorithm, not just a queue20
  • Compared dispatch policies and made the policy swappable25
  • Addressed starvation explicitly20
  • Modelled doors, maintenance and emergency as real states10

We run no AI here and nothing on this page grades you. The score is yours, and the useful number is the one you get on the same problem a month from now, cold.

kept in this browser only