d-centralize Interview Question

Q: Reverse the words in a string