Pregunta de entrevista de Amazon

it was a LRU cache leetcode problem.