LRU Cache (with TTL and LFU Follow-ups)

Asked at ByteDance · Coding Questions · Difficulty: Medium · Last asked Jun 16, 2026

Implement a fixed-capacity **LRU (Least Recently Used) cache** supporting `get` and `put` in average `O(1)`.

Loading the problem…