Domanda di colloquio di Microsoft

How would you implement LRU?

Risposta di colloquio

Anonimo

10 lug 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.