Design a cache that evicts the least frequently used key when it is full, and the least recently used of those when several keys tie on frequency.
new LFUCache(capacity) - capacity can be 0, in which case nothing is ever storedget(key) - the value, or -1 if the key is absent. A hit counts as one useput(key, value) - insert or overwrite. Overwriting counts as one use too. Inserting a new key into a full cache first evicts one key; the new key starts with a use count of 1- Both operations must be O(1) on average: no scanning for the victim