Compute BBO and NBBO from order data
Company: Citadel
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: medium
Interview Round: Technical Screen
Quick Answer: This question evaluates a candidate's skill in designing efficient data structures and algorithms for aggregating and querying order-book data, including computing best bid/ask prices and summing quantities at those prices.
Constraints
- 0 <= len(data) <= 200000
- 0 <= len(queries) <= 200000
- exchange_id is a non-empty string
- 1 <= price <= 10^9
- 1 <= quantity <= 10^9
- order_type is either 'bid' or 'ask'