Quick Summary
- Design a fixed-capacity cache that stores key-value pairs alongside integer priority ranks.
- Return cached values on hits, fetch from a slow data source on misses, and evict the lowest-ranked entry when at capacity.
- Handle rank ties by allowing the removal of any minimum-rank item.
What This Tests
- Data structure composition and trade-offs
- Efficient lookup and minimum-tracking mechanisms
- Cache eviction logic and state synchronization
- Interface-driven design and abstraction
Common Patterns
Hashing
Ask AI Assistant

Ask AI Assistant
Ask me anything about this coding question!
Stdout
-