Pregunta de entrevista de DataArt

how would you solve the problem with the optimization React application?