Uber interview question

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

Interview Answer

Anonymous

5 Aug 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