leetcode-541. 反转字符串 II-C语言

#define swap(x, y){ \
__typeof(x) c = x; x = y; y = c; \
}

char * reverseStr(char * s, int K){
    int len = strlen(s);
    int i=0, j, k, left;
    char *ret = s;
    
    while(len > 0) {
        left = len < K ? len : K;
    
        for(j=0, k=left-1; j

你可能感兴趣的:(LeetCode)