LeetCode
Reverse Words in a String III
Click
here
for an explanation.