Goldman Sachs Interview Question

A kind of LRU cache like question