Interactive DSA and system design

Learn complex engineering ideas by watching them move.

32stepsO(1)averageO(capacity)space

System Design lab

LRU Cache HashMap + DLL Flow

Step 1 / 32

HashMap Index (Quick O(1) Lookups)

A
null
B
null
C
null
D
null
E
null
F
null

Doubly Linked List (Ordering by Recency)

HEAD
Cache is Empty
TAIL
HashMap Reference Access / Hit (Active) Prepend (Head / MRU) Evicted Node (Tail / LRU)
Space play / pause stepR reset