Question d’entretien chez Amazon

it was a LRU cache leetcode problem.