Architecture & LLD Preview
Traffic Signal Controller
Model a traffic light cycling through Red → Green → Yellow with timed, guarded transitions.
The smallest table-driven FSM: a transition table + timed guards, wrapped in an intersection controller that enforces a mutual-exclusion safety invariant every tick.
Core Design Challenge
"Design a traffic signal. How do you stop it skipping yellow or letting both directions go green?"
What You'll Learn:
- ✦Modeling system states and transition triggers
- ✦Encapsulating state machines into design patterns
- ✦Handling concurrency, thread-safety, and transaction isolation
- ✦Managing invalid actions and edge cases cleanly in code