Systems and low latency
What data structure best supports a limit order book that must add, cancel and…
AdvancedMultiple choice
What data structure best supports a limit order book that must add, cancel and match quickly?
- AA single balanced tree keyed on price, holding every order
- BAn array of price levels plus a map from order id to node
- CA hash map keyed on price with no additional structure
- DA sorted list of every live order in the market
The worked solution is in Premium
The answer, the full working and the one idea to take away – for this and all 1,322 questions in the bank. Answer it in practice and your working is marked, with a known mistake named when you make one.
Report an issue with this question
Of the kind reported at
More systems and low latency questions
- Designing an order book, part 1 of 3Foundation · Premium
- You keep one million live orders in a hash map at 48 bytes an entry.Applied · Premium
- A buy order for 500 at a limit of $100.02 meets offers of 200 at $100.00, 100…Applied · Premium
- Designing an order book, part 2 of 3Applied · Premium
- Designing an order book, part 3 of 3Advanced · Premium
- An array-based book pre-allocates one slot per price tick.Foundation · Premium