Back to Questions

Implement an LRU Cache

20.2K viewsAsked at Google
Hard

Question Explain

Design and implement a Least Recently Used (LRU) cache. It should support `get` and `put` operations in $O(1)$ time complexity. This typically requires a Doubly Linked List and a Hash Map.

Start Trying This Question Simulation

Practice answering orally or with text to get instant AI feedback.

Practice with This Question