Pregunta de entrevista de Visa Inc.

Asked to build a function.