Frage im Vorstellungsgespräch bei Microsoft

How would you implement LRU?

Antwort im Vorstellungsgespräch

Anonym

10. Juli 2017

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.