0
Implement an LRU cache
Keep a hash map from key to node, and a doubly linked list ordered by recency (most recent at the head). get moves the node to the head; put inserts at the head and evicts from the tail when over capacity. Both are O(...
⑂ 0 remixes