Pergunta de entrevista da empresa Tripadvisor

Design a LRU cache.

Resposta da entrevista

Sigiloso

27 de mar. de 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.