You are viewing a single comment's thread. Return to all comments →
You will have to read through the questions thoroughly, which clearly states 3 lines mods... Here are my C++ changes to fix the issue
for (int i = 0; i < s.size(); i++) { if ((s[i] == t[i]) && ((s[i] == '0') || (s[i] == '1'))) //1st change res += '0'; //2nd change else res += '1'; //3rd change }
Seems like cookies are disabled on this browser, please enable them to open this website
XOR Strings
You are viewing a single comment's thread. Return to all comments →
You will have to read through the questions thoroughly, which clearly states 3 lines mods... Here are my C++ changes to fix the issue