d-centralize interview question

Q: Reverse the words in a string