• + 0 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
    }