Pregunta de entrevista de Capgemini

in a given string reverse only the selected word and reverse the those