Capgemini Engineering interview question

reverse a string