Skip to content

dmitry-slabko/lrucache-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This solution contains a sample implementation of LRU cache (Least Recently Used), as well as its benchmarks and unit tests.

Two implementations are given - NaiveLruCache and LruCache. The naive implementations uses only a linked list and it is inefficient, though works according to the contract. LruCache implementation is more in line with how LRU cache should be implemented, as it provides a linked list to track cache items usage order and a dictionary (hashtable) to store actual item data for fast access and manipulation.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages