Back to problems

Implement Multi-Level In-Memory Services

Object-Oriented Programming · Meta · Hard

Implement an in-memory database where each key maps to multiple field entries, and each entry has a value. The database processes a sequence of operations in order, and every operation includes a timestamp. Timestamps are non-decreasing across the input. A field may be permanent or may have a time-to-live; fields whose lifetime has ended must be treated as absent using lazy expiration. Produce one result for each query. The supported operations are: ["SET", timestamp, key,…

Checking your access…