写一个函数,判断一个字符串是否为另外一个字符串旋转之后的字符串,如:给定s1=AABCD和s2=BCDAA,返回1,给定s1=abcd和s2=ABCD,返回0
方法一:
#include <stdio.h>
#include <string.h>
#include <assert.h>
void reverse(char* left, char* right) {
assert(left != NULL);
assert(right != NULL);
while (left < right) {
char temp = *left;
*left = *right;
*right = temp;
left++;
right--;
}
}
void left_move(char *p,int m