Pregunta de entrevista de Bloomberg

it was some string manipulation question