面试系列4
原题:
以单词为最小单位翻转字符串
Write the function String reverseStringWordByWord(String input) that reverses
a string word by word. For instance,
reverseStringWordByWord("The house is blue") --> "blue is house The"
reverseStringWordByWord("Zed is dead") --> "dead is Zed"
reverseStringWordByWord("All-in-one") --> "All-in-one"
代码:
/********************************************************************
created: 2006/06/16
filename: C:\Documents and Settings\Administrator\桌面\flwo\reverse.c
file path: C:\Documents and Settings\Administrator\桌面\flwo
file base: reverse
file ext: c
author: A.TNG
version: 0.0.1
purpose: 以单词为最小单位翻转字符串
Write the function String reverseStringWordByWord(String input)
that reverses a string word by word. For instance,
reverseStringWordByWord("The house is blue") --> "blue is house The"
reverseStringWordByWord("Zed is dead") --> "dead is Zed"
reverseStringWordByWord("All-in-one") --> "All-in-one"
0条评论