Amazon Interview Question

reverse the word in a string