Back to problems

KV Store with Snapshot Versions

Object-Oriented Programming · Microsoft · Hard

Requirements Build a class that exposes this interface: Calling snapshot() must be constant time, or at least amortized inexpensive. It must not copy the entire key-value map for every snapshot. Once a snapshot exists, reading it later must still return the state captured at that moment, regardless of writes made afterward. As a standard extension, add support for removing keys with kv.delete(key). A deletion must not alter historical snapshots: a newer snapshot should…

Checking your access…