Please enter your email address or userHandle.
// C++ program to demonstrate working of rotate #include <bits/stdc++.h> using namespace std; int main() { string str = "ABCD"; // Rotating arround second element // string becomes "BCDA" rotate(str.begin(), str.begin()+1, str.end()); cout << str << endl; // Again rotating around second element // string becomes "CDAB" rotate(str.begin(), str.begin()+1, str.end()); cout << str; return 0; }
https://ide.geeksforgeeks.org/KVH6Do
BCDA CDAB