Architecture & LLD Preview
Key-Value Store
An in-memory key-value store with TTL expiry, and optionally transactions and versioning.
A lazy check on get() backstops a proactive Sweeper that pops a min-heap ExpiryQueue — work proportional to keys actually expired, never a full scan — re-checking each key's live expiry before deleting so a renewed key survives its stale heap entry.
Core Design Challenge
"Design an in-memory key-value store with TTL expiry. How do you reclaim expired keys without scanning the whole store?"
What You'll Learn:
- ✦Understanding eviction policies (LRU, LFU, FIFO)
- ✦Designing O(1) time complexity maps and list structures
- ✦Thread-safety, mutex locking, and concurrent read/write access
- ✦Managing memory boundaries and cache expiration policies