Skip to content

zestypanda/LRU_Cache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LRU_Cache

Implement LRU (Least Recently Used) Cache Class Template in C++ and Perform Unit Test using Google Test

using double linked list and unordered_map;

each node in the linked list contains data members of key and value;

hash map contains pairs of key and pointer to node;

after accessing an existing key, move the node to the front of double linked list, update the map

if the key not in the cache, delete the tail of double linked list, add a new node to the front, update the map

About

Implement LRU (Least Recently Used) Cache Class Template in C++ and Perform Unit Test using Google Test

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors