Pregunta de entrevista de Galatea Associates LLC

Typical algorithm problem involving strings