Problem
Implement an in-memory record store that supports setting and getting string keys. Each key stores a string value and may optionally have a TTL in seconds. Expired keys must behave as if they do not exist. Design a class with methods set(key, value, now, ttl=None), get(key, now), and delete(key, now).
Constraints
- 1 <= number of operations <= 10^5
- 0 <= now, ttl <= 10^9
- Keys and values are non-empty strings
- Calls may arrive with non-decreasing now values
Function Signature
def process_operations(operations):
You are practicing as a guest. Sign up free to run your code against the sample data. Your draft stays right here.



