Question d’entretien chez Amazon

Algorithm and problem solving question about strings