Full-stack Engineer
Implement a cache that evicts the least recently used item.
- 1Your approach
- 2The follow-up
- 3Reflect & learn
THE INTERVIEWER ASKS
The scenario
Design get(key) and put(key, value) for a fixed-capacity LRU cache with expected O(1) operations.
How would you approach it?
Explain your assumptions, your approach, and why you chose it.