Optiver interview question

Coding up trade analyzer from an order book