遍历字符串前n个字符,一边遍历,一边尾部插入字符,插入之后删除首部字符。class Solution {public: string LeftRotateString(string str, int n) { string tmp; int len = str.length(); int k = 0; if(n > len) return tmp; for(k = 0;k < n;k++) { str.insert(str.end(), str[0]...