Pregunta de entrevista de Amazon

Cannot share the code task. Also was question about creating unitests for simple function.