Reverse Words in a String 字符串分割逆序 + stringstream分割字符串
Givenaninputstring,reversethestringwordbyword.Forexample,Givens=“theskyisblue”,return“blueisskythe”.Update(2015-02-12):ForCprogrammers:Trytosolveitin-placeinO(1)space.对于Java实现,直接分割字符串然后逆序即可。代码如下:publi