• + 0 comments

    Here is my c++ working solution, you can watch the explanation here : https://youtu.be/eCWFW0phR-4.

    Keep in mind that it's not just about getting the right answer, it's also about making at most three changes, so an extra space on a new line will cause your code to fail, you can get a demo in the video above.

    string strings_xor(string s, string t) {
    
        string res = "";
        for(int i = 0; i < s.size(); i++) {
            if(s[i] == t[i])
                res += '0';
            else
                res += '1';
        }
    
        return res;
    }