another solution for 'reverse words in a string'

Signed-off-by: Wei Jin <wjin.cn@gmail.com>