Problem Description
You are given a string A of size N.
Return the string A after reversing the string word by word.
NOTE:
1 <= N <= 3 * 105
The only argument given is string A.
Return the string A after reversing the string word by word.
Input 1: A = "the sky is blue"
Input 2: A = "this is ib"
Output 1: "blue is sky the"
Output 2: "ib is this"
Explanation 1: We reverse the string word by word so the string becomes "the sky is blue".
Explanation 2: We reverse the string word by word so the string becomes "this is ib".
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a question? Checkout Sample Codes for more details.