Frequency-Based Eviction Cache
Asked at LinkedIn · Coding Questions · Difficulty: Hard · Last asked Apr 17, 2026
Build a fixed-capacity key-value cache. Every key keeps a use count: each read or write of the key adds one. When the cache is full and a new key must be stored, the cache drops the entry that has been used the fewest times, and among entries with that same count, the one whose last use is oldest.
Loading the problem…
More LinkedIn interview questions
- Design LinkedIn's Skills Extraction & Taxonomy Pipeline
- Stratified Sampling from Class-Bucketed Data
- Design Post Search with Keyword Exclusion and Frequency Ranking
- Ranked-Choice Voting (Instant Runoff)
- AI Personalized Recruiter Message Generation
- Real-Time Collaborative Code Editor