Question d’entretien chez Grant Street Group

leet-code easy question, something about manipulate the substring