How would you implement LRU?
Anonymous
Java has their "HashLinkedList" which is ideal for this mission. it is implemented with 2 data structure2: 1. HashMap : key -> 2.Linked list contatining nodes and pointer to head and tail. Having that, you can in O(1) make get\set and refactoring the list if the LRU is bounded.
Check out your Company Bowl for anonymous work chats.