codility - OddOcurrenceInArray

2020. 3. 10. 22:11codility

Source code

int solution(int A[], int N) {
    int i, result = 0;
     
    for(i = 0; i < N; i++)
        result ^= A[i];
     
    return result;
}

'codility' 카테고리의 다른 글

codility - TapeEquilibrium  (0) 2020.03.10
codility - BinaryGap  (0) 2020.03.10
codility - CyclicRotation  (0) 2020.03.10
Codility - FrogJmp  (0) 2020.03.10
Codility - Permutation check  (0) 2020.03.10