LRU Cache — hashmap + doubly linked list
Every access moves a key to the front. When the cache is full, the key at the back (least recently used) is evicted.
Try:
← most recentleast recent →