Design a limit order book

hard~45 min#data-structures#lld#low-latency#trading

Design the in-memory data structure for a limit order book supporting: add a limit order, cancel by order id, and match an incoming market order against the opposite side.

State the complexity of each operation and justify your structure against the access pattern — not against what is theoretically elegant.

Solution — locked

Sign in to unlock this one

The solution opens once you explain the idea in your own words and it passes the grader — which needs an account to record. Signing in is free.

Log in