int t=0;
t=~t;
请问为什么t会是-1;
Given an array of integers, every element appears three times except for one. Find that single one.Note:
Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory?
 public int singleNumber(int[] A) {  
        int once = 0;  
        int twice = 0;  
  
  
        for (int i = 0; i < A.length; i++) {  
            twice |= once & A[i];  
            once ^= A[i];  
            int not_three = ~(once & twice);  
            once = not_three & once;  
            twice = not_three & twice;  
        }  
        return once;  
    }  
这段代码怎么理解,求指导。 位运算学的好烂。。位运算