OpenAI interview question

Implement a SnapshotArray in any language