About this question
Hard · data_structures · Quant Developer interview question · persistent, immutable, copy-on-write, bst, data_structures, version-snapshot
Persistent data structures are crucial for backtesting engines and regulatory audit systems, enabling queries of historical states like an order book at any point in time. This is achieved via 'path copying,' where modifications create new versions while sharing unchanged structure, offering efficient space and time complexity for versioning. This problem simulates this copy-on-write behavior, a key principle in systems that require replay-accurate historical reconstruction. Task Implement the