Uber Interview Question

Implement LRU cache with get and set operations in constant time O(1).

Interview Answer

Anonymous

Aug 5, 2014

Maintain doubly linked list and hash. Hash keys will be keys in the cache and hash values will be linked list node (which contains value)

4