Least recently used cache ( LRU cache) problem.
Anonimo
Standard question. We can find on interview bit, leetcode etc. Only that even if you mug up and go for interview, they will assure that you understood what you mugged up. Understading what we are doing was critical.