You are viewing a single comment's thread. Return to all comments →
XOR for array with even number of elements is always 0
def sansaXor(arr):
arr_len = len(arr) if arr_len % 2 == 0: return 0 c = 0 for i in range(arr_len): if i % 2 == 0: c ^= arr[i] return c
Seems like cookies are disabled on this browser, please enable them to open this website
Sansa and XOR
You are viewing a single comment's thread. Return to all comments →
XOR for array with even number of elements is always 0
def sansaXor(arr):