Pregunta de entrevista de Amazon Web Services

Basic hashmap question and some recursion