Design Problems
Patterns to know:
- LRU Cache (LinkedHashMap or Doubly Linked List).
- Randomized Set (HashMap + Array).
- Rate Limiter / Hit Counter.
- LFU Cache.
How to identify:
- Question asks to “design a data structure” with O(1)/O(log n) operations.
- Often mix of HashMap + Linked List + Heap.