Question d’entretien chez Uber

Longest repeating sequence with replacement