Pregunta de entrevista de Qualtrics

It was a hackerrank question.