Implement a Versioned Key-Value File Store
PersonaSoftware Engineer · Online AssessmentLast 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.
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.