~learn.
lecture · 13:31 · 4 checkpoints · browser voiceIntermediate

Design an LRU cache

A bounded cache where get and put are constant time: why a hash map needs a doubly linked list, sentinels, the split between the cache and a pluggable eviction policy, why even get takes the lock, the eviction callback outside it, and follow-ups from LFU to sharding.

01 · No OrderedDict
LLD-02 · Design an LRU Cache

Two structures, four pointers, one lock.

Build it yourself

The interviewer says: build an in-memory cache with a fixed capacity.