Question d’entretien chez Indeed

Simple question about string and array but I did not give the optimal solution.