LRU Cache
Store items in an OrderedDict, move keys to the end whenever they are read or updated, and evict the oldest item when capacity is exceeded.
Implement an LRU cache with O(1) get and put operations.
Store items in an OrderedDict, move keys to the end whenever they are read or updated, and evict the oldest item when capacity is exceeded.
Store items in an OrderedDict, move keys to the end whenever they are read or updated, and evict the oldest item when capacity is exceeded.
Implement an LRU cache with O(1) get and put operations.