Amazon Interview Question

Implement an LRU cache

Interview Answer

Anonymous

Mar 6, 2019

Gave a brute force answer, with time complexity O(n). They followed up with getting it to O(1) for both reads and writes. I had done a Doubly linked list implementation in the past, but couldn’t recall it and I think it hurt me. Didn’t get offer.