You are viewing a single comment's thread. Return to all comments →
Let me know if you have any questions
A | index | xOR of the array A till the index 0 | 0 | 0^0->0 1 | 1 | 0^1 -> 1 3 | 2 | 1^3 -> 2 0 | 3 | 2^0 -> 2 4 | 4 | 2^4 -> 6 1 | 5 | 6^1 -> 7 7 | 6 | 7^7 -> 0 0 | 7 | 0^0 -> 0 def sequence(N): x = N % 8 if x == 0 or x == 1: return N if x == 2 or x == 3: return 2 if x == 4 or x == 5: return N+2 if x == 6 or x == 7: return 0
Seems like cookies are disabled on this browser, please enable them to open this website
Xor-sequence
You are viewing a single comment's thread. Return to all comments →
Let me know if you have any questions