Design a cache whose eviction policy can be LRU or LFU — the classes, and how each policy is implemented efficiently.
Design a cache whose eviction policy can be LRU or LFU — the classes, and how each policy is implemented efficiently.
Opens with the full question.