Domanda di colloquio di Uber

Longest repeating sequence with replacement