Low Level Design¶
Object-level design problems: the problem, a working Python solution, and a critique of that implementation — where it is fragile, what it costs, and what changes when the requirements grow.
- LFU cache with O(1) get, put (and delete) — a frequency list per
count, and why
min_freqnever needs a search until you adddelete. - LRU cache with TTL and thread safety — prompt only so far.