• + 0 comments

    Here is my Python solution!

    def sansaXor(arr):
        if len(arr) % 2 == 0:
            return 0
        result = 0
        for i in range(0, len(arr), 2):
            result ^= arr[i]
        return result