Pregunta de entrevista de Salesforce

Puzzle, Programming question on Strings