leetcode:reverse word in a string