violent solution
class Solution {
public:
string reverseLeftWords(string s, int n) {
string str;
for(int i =n; i < s.length(); i++){
str.push_back(s[i]);
}
for(int i = 0; i < n ; i ++){
str.push_back(s[i]);
}
return str;
}
};
This is the end of the algorithm. If you think it’s not bad, please move your hands and give it a thumbs up before leaving!