Question d’entretien chez IBM

Two string manipulation question on hacker rank