Katkat

Implement a Versioned Key-Value File Store

PersonaSoftware Engineer · Online Assessment

Last updated

Practice a Persona coding interview problem focused on implement a versioned key-value file store. The prompt emphasizes edge cases, clean implementation, and verifiable test behavior without revealing the solution.

Implement an in-memory file store that supports progressive requirements.

Operations include set(key, value), get(key), delete(key), scan(), scan_prefix(prefix), timestamped gets, and set_ttl(key, value, timestamp, ttl). Expired keys must not be returned.

Implement:

def process_file_store_operations(operations: list[list]) -> list:
 pass

Return booleans for deletes, strings for gets, and lists of key=value strings for scans.