Back to Question

Implement an LRU Cache

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

Click "Start Speaking" and answer the question naturally.