# Single Number

A simple solution, using 2 properties of XOR: **A ⊕ A = 0** and **B ⊕ 0 = B**\
In other words, **A ⊕ A ⊕ B = B**

```java
class Solution {
    public int singleNumber(int[] nums) {
        
        
        for(int i = 0; i< nums.length-1; i++){
            nums[i+1] ^= nums[i];
        }
        
        return nums[nums.length-1];
    }
}
```
