Animate LRU cache replacement step by step. Watch hits, misses, and evictions as the cache tracks the least recently used item.
Least Recently Used evicts whichever item was accessed least recently. The idea: if you haven't used something in a while, you probably won't need it soon.
LRU is implemented with a hash map (O(1) lookup) + doubly-linked list (O(1) move-to-front). Python's OrderedDict combines both.
Great for general-purpose caching, CPU page replacement, and browser history. Works best when recently-accessed items are likely to be reused (temporal locality).