Medium · System Design

LRU cache

Design a bounded key-value cache that evicts the least recently used entry.

LRU cache memory room
The link he re-clips drags the whole miniature chain forward on its own, the far link tipping itself into the bin — Touched key jumps to front

Retrieval check

With the notes hidden, what pattern should this room bring back?

Related free rooms