OpenAI Interview Question

Implement a SnapshotArray in any language