I am recently faced with the following problem. You are given binary string a and b where 1 <= length(a) <= length(b) <= 10^5. Let length(a) = n. Now we are required to find the smallest binary-valued substring S of b with length n where XOR(S, a) is minimum. I thought a solution with bitsets which may avoid TL, but i couldn't made it up. Can anybody help me to solve this, please?
Example: Input: 1101 1011000 Output: 1100