Reported interview periodDec 2025–Apr 2026
In-Memory Database with Expiry and Snapshots
Build an in-memory database in four stages. Each key owns string field/value pairs.
Practice focusMissing values return "" . Scans emit field(value) entries sorted by field. A TTL value is live over [created at, created at + ttl) . A backup captures all live fields and each field's remaining lifetime. Restore selects the newest backup at or before timestamp to restore , replaces current state, and restarts remaining lifetimes at timestamp . Assume timestamps supplied to mutating timed operations are nondecreasing. Backups must not share mutable state with the live database.…