Pregunta de entrevista de Codility

React and algorithmic challenge in codility platform.