Cant understand why code not working
Ultra-Fast-Mathematicians
Rishabh, plz follow this approach for solving the prob, take 3 strings, 2 as input values,
string str1;
string str2;
string str3;
and then check ,
for(int i=0;i<len1;i++)
{
if(str1[i]==str2[i])
{
str3[i]=‘0’;
}
else
{
str3[i]=‘1’;
}
}
for(int i=0;i<len1;i++)
{
cout<<str3[i];
}
I solved the question later using this approach but I wanted to know what was wrong in my first approach.
Your code was not producing correct output for the hidden test cases. Thts why it was not getting submitted.