Grokking Java Interview Questions
0% completed
Implement an LRU Cache
A store that keeps a limited number of results in memory, so that they do not have to be computed or loaded again, is called a cache. When the cache is full, a new result needs a place, and a rule must choose the entry that is removed. The rule that removes the entry which has been unused for the longest time is called LRU, for least recently used.
HashSet, LinkedHashMap, and an LRU Cache builds such a cache with a class of the JDK
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%