All problems
Foundational·⚙️ Infrastructure·Walmart · Cisco · Bosch

Design
Traffic Light System

Design a traffic light controller for a multi-road intersection, managing signal cycles and supporting emergency overrides.

#State Machine#OOP
Start Solving 6F + 3NF requirements inside

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.

01

Model timed state transitions (Red → Green → Yellow)

02

Coordinate multiple related state machines at once

03

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

Unlock Requirements

05 -  Companies that ask this

You may face this exact question in your next interview.

W
Walmart
C
Cisco
B
Bosch

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 Solving