// Description :- Given a string, the task is to reverse the order of the words in the given string. // Example :- // Input 1: // A = "the sky is blue" // Input 2: // A = "this is ib" // Output 1: // "blue is sky the" // Output 2: // "ib is this" // Time Complexity = O(N), Space Complexity = O(N) #include using namespace std; string solve(string s) { vectorv; string str=""; for(int i=0;i0;i--){ str+=v[i]; str+=' '; } str+=v[0]; return str; } int main() { string s; getline(cin, s); cout<