About this question

Doubly Linked Order List

Easy · data_structures · Quant Developer interview question · data-structures, doubly-linked-list, order-book, c++, low-latency, o1-removal

At each price level in an order book, exchanges maintain a FIFO queue of resting orders. Efficiently handling cancel-on-arrival messages requires O(1) removal of specific orders, as linear scans would introduce unacceptable latency for competitive market-making. A doubly linked list with a direct-address ID map, similar to structures used in production matching engines like NASDAQ OUCH and CME iLink, provides O(1) push_back and O(1) remove operations. Task Implement the OrderList struct, backed