Providence interview question

Reverse words in a string