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 hintsTopics
Also asked at 30 companies
More Salesforce Questions
LRU CacheMediumMaximum Number of Occurrences of a SubstringMediumClosest Equal Element QueriesMediumLongest Substring Without Repeating CharactersMediumGroup AnagramsMedium
View all Salesforce questions