Pregunta de entrevista de Microsoft

How would you implement LRU?

Respuesta de la entrevista

Anónimo

10 de jul de 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.