Dear all,

In this problem, how can I deal with the case n < 0?

```
class Solution {
public:
int singleNumber(int A[], int n) {
if( n == 0 )
return 0;
int temp = A[0];
for( int i = 1; i < n; ++i ) {
temp ^= A[i];
}
return temp;
}
};
```

Thanks,

Chunting