can’t understand what the problem is saying
Can't understand what the problem is saying
After taking the input, we enter a for loop with range from 0 to n-1 , where n is the length of the input string(both strings have the same length). We extract one character from each string and put them in two character variable a and b.
We now check whether they are the same character or not. If they are the same, we output 0. Otherwise, we print out 1 since a and b are not same characters.
After the loop is finished, we get the desired output binary string.
You just have to put 1 if the string have different chars and 0 if they have the same char at the index.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.