I am thinking of a state as solve(pos, ca,cb,cc) where pos denotes the position, ca,cb, cc denotes the count of 1s in first, second, third-string respectively.My approach is to call for solve(pos-1,ca-1,cb,cc) and similarly for other 2 possibilities as well. Is my approach correct?
Logic Check ( Maximum Xor Permutation )
this will probably work, but this is the MOST brute force way to do this
think in terms of bits and not numbers
u simply need to check for the largest numbers that should have diff values
I am unable to solve the porblem,please guide through the approach.