Commure·Software Engineer·Technical Phone Screen
- Design and implement an LRU cache that supports per-key TTL expiration. The cache should return values only if they exist and haven't expired, refresh recency on access, and evict the least recently used non-expired entry when at capacity. Walk through your data structure choices and complexity.
“This one took me a second to settle into because the TTL layer adds just enough wrinkle to throw off your default LRU muscle memory.”