Elsevier interview question

Write an LRU cache/memoization logic.