Overview
An LFU (Least Frequently Used) Cache tracks how many times each cached key has been accessed. By grouping keys of identical access frequency into doubly linked lists and tracking minFreq, get, put, and eviction all run in O(1) worst-case time while protecting consistently popular hot keys from one-off scan bursts.