Timed Cache with Expiration and OOM Eviction
Implement an in-memory TimedCache with TTL expiration.
The cache supports:
set(key, value, ttl): write or updatekeyat the current time. Its expiration time iscurrent_time + ttl.- `get(...
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Standard Input
Execution Result:
