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!

Discussion (0)

No comments yet. Start the discussion!

Prev Next