About this question
Medium · Algorithms & Data Structures · Quant Trader interview question · order-book, matching-engine, data-structures, FIFO, queue
When implementing a matching engine for a limit order book, efficient data structures are crucial for performance. Consider a single price level within the order book (e.g., all buy orders at a specific price). This price level needs to manage multiple orders arriving at different times. To ensure fairness and prevent queue jumping, orders are typically processed in a first-in, first-out (FIFO) manner. What data structure is most commonly used to represent the orders at a single price level wit