Question: Design a Java class that represents a cache with a fixed size. It should support operations like add, retrieve, and remove, and it should evict
- Design a Java class that represents a cache with a fixed size. It should support operations like add, retrieve, and remove, and it should evict the least recently used item when it reaches capacity.
Step by Step Solution
3.44 Rating (157 Votes )
There are 3 Steps involved in it
Here is an example implementation of a Java class for a fixedsize cache with LRU Least Recently Used eviction policy java import javautilHashMap impor... View full answer
Get step-by-step solutions from verified subject matter experts
