Pregunta de entrevista de Tata Consultancy Services

reverse array, change specific places in a string with an asterix