C++ 4 ms


  • 0
    L
        char findTheDifference(string s, string t) {
            string cat = s + t;
            char a = '\0';
            for (char c : cat) a ^= c;
            return a;
        }
    

Log in to reply
 

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