3ms C solution


  • 0
    A

    char findTheDifference(char* s, char* t) {
    int i;
    int T=0;
    for (i=0;(s+i)!='\0';i++)
    T=T^
    (s+i);
    for (i=0;(t+i)!='\0';i++)
    T=T^
    (t+i);

    return T;
    

    }


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.