beginnerDesign Patterns~55 minFree
Cache Eviction (Strategy Pattern)
One cache, three eviction policies, swappable at runtime — the Strategy pattern made real. Build FIFO, LRU, and LFU policies (each a small data-structure exercise), plug them into a single capacity-bound cache, and hot-swap the algorithm without touching the cache code.