About this question
Hard · low_latency · Quant Developer interview question · linked-list, hash-map, order-cancel, low_latency, O(1), iterator
In high-frequency trading, order management systems require constant-time, O(1), cancellation to minimize latency. This is achieved by combining a doubly-linked list to maintain FIFO order with a hash map for direct O(1) access to any order. This data structure is a canonical solution for building low-latency order queues where performance is critical. Task Implement the OrderQueue class with three methods: insert(int id, int value), cancel(int id), and drain(). The insert method should add an
Keep practicing