Design a Real-Time Stock Trading System
A stock trading system must accept orders, match buy and sell orders in real time, and produce correct executions under strict latency and consistency constraints. In interviews, the matching engine is the core: it must enforce price-time priority (best price first, then earliest time).
This walkthrough follows the Interview Framework and focuses on what you'd present in a 45-60 minute interview.