Design and Implement an LRU Cache
DSA
Medium
21 views
Problem Description
Design an LRU (Least Recently Used) Cache that supports get(key) and put(key, value) operations in constant time O(1). The cache should automatically remove the least recently accessed item when the capacity is exceeded. Explain which data structures you will use and why they are suitable for achieving O(1) complexity.
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!