Quant Interview Practice Questions
题目详情
In high-frequency trading systems, maintaining real-time statistics like trade counts and volumes across multiple threads is critical for risk management and signal generation. Using locks for these updates introduces unacceptable latency and contention, making lock-free atomic operations with relaxed memory ordering the standard approach. Task Implement a thread-safe TradeStats class that tracks the total number of trades and the total traded volume for a fixed number of symbols. You must use