LeetCode 460: LFU Cache
Problem Restatement We need to design a Least Frequently Used cache. The cache supports two operations: get(key) put(key, value) The cache has a fixed capacity . If the cache is full and we need to insert a new key, we remove the least frequently used key. Each key has a use counter. A key's frequency increases when: get(key) is called on it. put(key, value) is called on an existing key....