Leetcode::Single Number
思想:相同数异或运算等于0;
class Solution { public: int singleNumber(int A[], int n) { // IMPORTANT: Please reset any member data you declared, as // the same Solution instance will be reused for each test case. int sum = A[0]; for( int i = 1; i < n; i++ ) { sum ^= A[i]; } return sum; } };