30:00
Design and implement a data structure for a Least Frequently Used (LFU) cache. Implement get and put operations with O(1) time complexity.
1≤capacity≤1041 \leq \text{capacity} \leq 10^41≤capacity≤104
0≤key,value≤1090 \leq \text{key}, \text{value} \leq 10^90≤key,value≤109
At most 2×1052 \times 10^52×105 calls will be made to get and put.
get
put
Initialize LFU Cache with capacity 2
Empty cache
No frequency buckets