Loading page…
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.
The interviewer says: build an in-memory cache with a fixed capacity.