Lru-cache

1 articles

dsa8 min read

LRU Cache — Doubly Linked List + HashMap from Scratch

Build an LRU Cache from scratch using a doubly linked list with sentinel nodes and a HashMap for O(1) get and put operations. The most frequently asked hard design problem at Amazon, Microsoft, Google, and Facebook — explained step by step with diagrams.

Read →