About this question

Low-Latency Timer Heap

Medium · low_latency · Quant Developer interview question · data-structures, heap, c++, algorithms

Efficient time-based event management is critical in high-frequency trading systems for handling order timeouts, heartbeat checks, and session keep-alives. Implementing a custom binary heap ensures deterministic $O(\log N)$ processing of these events, which is essential for maintaining strict chronological order in exchange connectivity gateways. Task Implement a class TimerHeap that manages timer events using a manually implemented Min-Heap (Binary Heap) structure. The class must support addin