Difficulty: Easy
Category: low_latency
Asked at: Jump Trading, Tower Research, Citadel Securities, Optiver, HRT
Topics: data-structures, design, arrays
Low-latency logging is critical in high-frequency trading systems to monitor execution paths without introducing jitter or garbage collection pauses. A circular buffer, or ring buffer, enables constant-time writes and fixed memory usage by overwriting the oldest data when capacity is reached. This data structure ensures that the most recent market events or debug information are always available for post-mortem analysis while maintaining deterministic performance. Task Implement a RingBufferLog
Practice this easy developer interview question on MyntBit - the LeetCode for quants with 200+ quant interview questions for Jane Street, Citadel, Two Sigma, and other top quantitative finance firms.