Given an array of integers, every element appears twice except for one. Find that single one.
和上一题比这题就是渣。
class Solution { public: int singleNumber(int A[], int n) { if(A == NULL)return 0; int re = 0; for(int i = 0 ; i < n ;i++)re ^= A[i]; return re; } };