Quick Overview

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 a Versioned Key-Value File Store

Company: Persona

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: hard

Interview Round: Online Assessment

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: ```python 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.

Overview: 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.

Process file-store operations including set, get, delete, scan, prefix scan, timestamps, and TTL expiration.

Examples

Input: ([["set","a","1"],["get","a"]],)

Expected Output: ["1"]

Explanation: Basic set/get.

Input: ([["get","missing"]],)

Expected Output: [""]

Explanation: Missing key.

Loading coding console...