LRU Cache
A fixed-size cache that evicts the Least Recently Used item.
Intermediate
Hash map + doubly linked list gives get and put. Python: functools.lru_cache or OrderedDict.move_to_end.
Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.
Discussion (0)
Sign in or join free to ask questions and discuss this topic.