Build a Multi-Level In-Memory Store with AI
Hard · AI-Assisted Coding · about 90 minutes
Asked at Meta, Coinbase, Shopify.
Build an in-memory key-value store in four levels with an AI assistant, with hidden tests at each level. Level 1: set, get and delete fields on records. Level 2: scan a record's fields, optionally by prefix, in sorted order. Level 3: TTL. Writes can carry a time-to-live, and every operation receives a timestamp. Level 4: back up and restore at a given timestamp, keeping the remaining TTLs.