aloo_lelo

 avatar
bruteCoder
java
7 months ago
246 B
3
Indexable
Never

class Solution {
    static int gameOfXor(int N , int[] A) {
        // code here
        
        if(N%2 == 0 )return 0;
        
        int out = 0 ;
        
        for(int i = 0 ;i<N;i+=2) out ^= A[i];
        
        return out;
    }
};
Leave a Comment