LRU Cache Visualizer
Operations
Map [ Cache Size: 3 ]
<Key, Value> | Node Address |
---|---|
Map is empty. |
Algorithm
- Is `key` present in the map?
- Update the node value
- Put the node after head
- Update the Map
- Is map size < cache size?
- Create & Insert the node after head
- Update the Map
- Else
- Delete the node before End node
- Update the Map
- Create & Insert the node after head
- Update the Map