Given an input string, reverse the string word by word.
Example,
Given s = “the sky is blue”,
return “blue is sky the”.
Solution
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
Given an input string, reverse the string word by word.
Given s = “the sky is blue”,
return “blue is sky the”.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|