public static int singleNumber(int[] A){
        int[] bitVector = new int[32];
        int result = 0;
        for(int i = 0; i < 32; i++){
            for(int j = 0; j < A.length; j++){
                bitVector[i] += (A[j] >> i) & 1;
            }
            result |= (bitVector[i] % 3) << i;
        }
        return result;
    }