Barclays Interview Question

Least recent cache. leet code (medium)