Quant Interview Practice Questions
题目详情
High-frequency trading systems process millions of orders daily, making memory optimization and cache efficiency critical. The Flyweight design pattern addresses this by deduplicating repetitive data, such as ticker symbols, into a shared pool and utilizing lightweight integer IDs. Implementing a garbage-collected Flyweight pattern ensures that memory is dynamically managed and stale symbols are safely recycled. Task Implement an OrderManager class that uses a garbage-collected Flyweight patter