Domanda di colloquio di DataArt

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