Given an Array A of n elements, (n < 200000), At each step I can transform whole array such that for every i <= 0 < n, A[i] = A[i — 1] xor A[i + 1]. Is it possible to convert whole array to 000....0 (all zeros) after infinite steps. for example A = [ 0, 1, 0, 0, 0, 1, 0 ]
A = [ 1, 0, 1, 0, 1, 0, 1 ]
A = [ 0, 0, 0, 0, 0, 0, 0 ]
So A can be transferred to zeros after 2 steps. PS. Consider A[-1] = A[n] = 0, always
I would be highly thankful if someone helps me to solve this task. I saw this problem few days back, will post its link if I found it.