DATA STRUCTURES LAB
LRU Cache Visualizer
Hash Map + Doubly Linked List
01/06
LIVE MEMORY MODEL
A cache is a small memory with a strict rule: the oldest untouched item leaves first.
MODELMap + List
CONFIGURATION
Cache controls
LINKED LIST / LIVE MEMORY
Doubly Linked List
Head = Most Recently Used · Tail = Least Recently Used
MRUNodeLRU
HEAD →← TAIL
Most recently usedLeast recently used
Each node stores prev and next pointers. The arrows represent the actual list connections.
DIRECT ACCESS
Hash Map
Key → Node reference
| Key | Value | Node reference |
|---|
ACTIVITY
Operation log
Recent cache events
INTERNAL STATE
Pointer inspector
Headnull
Tailnull
Hits0
Misses0
Run GET or PUT to inspect a node.
GUIDED PRACTICE
Step-by-step example
Click a step to execute it.