Least-recently-used-LRU-

Design CacheEvictionPolicy with 2 strategy LRU(Least recently used),
Cache size = 5
Example: LRU
Input: A B C D E F B G

  1. A
  2. A B
  3. A B C
  4. A B C D
  5. A B C D E
  6. F B C D E
  7. F B C D E
  8. F B G D E

GitHub

View Github