LRU Cache at Amazon
Medium46.8% acceptance
This problem has 87.5% frequency at Amazon.
Problem Description
Design a data structure that follows the constraints of a **[Least Recently Used (LRU) cache](<https://en.wikipedia.org/wiki/Cache_replacement_policies#LRU>)**. Implement the `LRUCache` class: * `LRUCache(int capacity)` Initialize the LRU cache with **positive** size `capacity`. * `int get(int...
Read full problem and hintsTopics
Also asked at 127 companies
More Amazon Questions
Two SumEasyLongest Substring Without Repeating CharactersMediumAdd Two NumbersMediumMerge k Sorted ListsHardGroup AnagramsMedium
View all Amazon questions