首页 > 代码库 > leetcode--012 single number I

leetcode--012 single number I

 

1 public int singleNumber(int[] A) {2         int s=0;3         for(int i=0;i<A.length;i++){4             s=s^A[i];5         }        6         return s;7     }