Design
Traffic Light System
Design a traffic light controller for a multi-road intersection, managing signal cycles and supporting emergency overrides.
01 - Why interviewers ask this
It's a clean, small state-machine problem interviewers use to check your instinct for timed transitions and for coordinating multiple related state machines (multiple lights at one junction) safely.
02 - Where this system exists in the real world
You interact with this design every day.
Smart city intersection traffic controllers
Simulation software for traffic engineering
IoT-connected traffic signal networks
03 - What you'll master
Solve this once. Know it forever.
Model timed state transitions (Red → Green → Yellow)
Coordinate multiple related state machines at once
Keep timing logic decoupled from signal display
04 - What you'll design
6 functional · 3 non-functional requirements.
Manage Red, Yellow, Green signal cycles for each road at an intersection
5 more requirements inside
Sign in to unlock the full brief and start designing
05 - Companies that ask this
You may face this exact question in your next interview.
Ready?
Open the canvas.
Design it yourself.
See all requirements, use staged hints, run your code, and compare with community discussions - all on the same canvas.
Start SolvingMore in Infrastructure