Pregunta de entrevista de Wiser Solutions

String manipulation, somewhat normal question