Intel Corporation interview question

Asked to design LRU Cache memory structure

Interview Answer

Anonymous

Sep 2, 2020

linked list with hash map, each time the user access to an address the node is removed from list (if exist) and inserted to the top, if there are max number of addresses in cache you need to remove last node, hash table is for O(1) time comlexity for access to the right node