Why i m getting wrong ans for it?

@Muskan-Gupta-598128740703036 for test case
1111110111
1111111111
1111111111
ans will be
1111111110
but your code is giving
1111111111
try to think at what positions you will get zero after xor of three strings

sir , i have changed my code

giving correct for the test case you gave

but wrong ans at submission

@Muskan-Gupta-598128740703036 for test case
111111011 0
1111111111
1111111111
ans will be
111111110 0
Because xor of 1,1,0 is 0 and in your input there are two positions where we will have these permutation, at all other places we can have xor of 1,1,1 Which is 1 , also xor of 1,0,0 is 1, so basically you have to find at how many positions you will have two 1 and assign 0 at that position.
but your code is giving
1111111110

You have to xor the first two arrays having the more number of 1 and form the largest number you can form, after that xor the third array to form the largest array.
Also in binary array,
110000 is greater than
101111

sir , i have corrected my code , working fine for the test case you gave

still wrong ans on submission :frowning:

i tried to make max from string a and b , then max from (a,b) and c

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.