题解 | #字符串的旋转#
字符串的旋转
https://www.nowcoder.com/practice/85062aa6016640d188a6a0daf9f5da0e
class StringRotation { public: string rotateString(string A, int n, int p) { // write code here string res=A.substr(p+1,n)+A.substr(0,p+1); return res; } };
字符串的旋转
https://www.nowcoder.com/practice/85062aa6016640d188a6a0daf9f5da0e
class StringRotation { public: string rotateString(string A, int n, int p) { // write code here string res=A.substr(p+1,n)+A.substr(0,p+1); return res; } };
相关推荐