Yahoo interview question

reverse words in string