Testcase working when ran through custom input but same testcase showing no result when the code is submitted

programming
Tags: #<Tag:0x00007f242dd586a0>

#1

/**

  • @input A : String termination by ‘\0’
  • @Output string. Make sure the string ends with null character
    */

void swap(char *a, char *b){
char temp = *a;
*a = *b;
*b = temp;
}

char* reverse(char* a, int s, int e){

while(s <= e){
    //printf("%d,%d\n",s,e);
    swap(&a[s],&a[e]);
    s++;
    e--;
}
//printf("%s\n",a);
return a;

}

char* solve(char* a) {

int s = 0;
int e = strlen(a)-1;


//printf("%s\n",a);
int i = 0;
while(isspace(*a)){
    a++;
}
//printf("s:%s\n",a);
reverse(a,s,e);
i=0;
while (i<=e+1) {
    
    if(a[i] == ' ' || a[i] == '\0'){
        reverse(a,s,i-1);
        s = i+1;
    }
    i++;
}
while(isspace(*a)){
    a++;
}
//printf("%s\n",a);
return a;

}

A : " fwbpudnbrozzifml osdt ulc jsx kxorifrhubk ouhsuhf sswz qfho dqmy sn myq igjgip iwfcqq "

Try running this code against this testcase and while submitting the same test case has no output.