SeniorSenior (6–10 yrs)CodingPythonAmazonGoogleUber
Design
LRU Cache Design
Design an LRU cache with O(1) get and put. Evict the least recently used key when capacity is exceeded.
Answers use simple, clear English.
Time: O(1) amortized per opSpace: O(capacity)
Confidence
#linked-list#hashmap