Question d’entretien chez Tripadvisor

Design a LRU cache.

Réponse à la question d'entretien

Utilisateur anonyme

27 mars 2014

LinkedList and HashMap. I said queue instead of linked list, he really wanted linked list (queues are very often implemented as linked lists), I said array instead of hash map, he really wanted hash map (hash maps are usually implemented as arrays)... Didn't get to finish coding the solution, but should have been easy.