Pregunta de entrevista de Infosys

they asked a string manipulation question