Approach hintTry it first, then revealHide
Map each frequency to a recency-ordered list of keys and track the minimum frequency. An access moves a key to the next frequency's list; eviction removes the least recent key from the minimum-frequency list.