LFU Cache at Salesforce

Hard48.6% acceptance

This problem has 75.0% frequency at Salesforce.

Problem Description

Design and implement a data structure for a [Least Frequently Used (LFU)](<https://en.wikipedia.org/wiki/Least_frequently_used>) cache. Implement the `LFUCache` class: * `LFUCache(int capacity)` Initializes the object with the `capacity` of the data structure. * `int get(int key)` Gets the val...

Read full problem and hints

Topics

Also asked at 30 companies


More Salesforce Questions

View all Salesforce questions