题解 | #c++ 四行#
左旋转字符串
http://www.nowcoder.com/practice/12d959b108cb42b1ab72cef4d36af5ec
class Solution {
public:
string LeftRotateString(string str, int n) {
while(n--){
char temp = str[0];
remove(str.begin(), str.end(),temp);
str[str.size()-1] = temp;
}return str;
}
};