1 | class Solution { |
Bit Manipulation1
2
3
4
5
6
7
8
9class Solution {
public int singleNumber(int[] nums) {
int a = 0;
for (int i : nums) {
a ^= i;
}
return a;
}
}
1 | class Solution { |
Bit Manipulation1
2
3
4
5
6
7
8
9class Solution {
public int singleNumber(int[] nums) {
int a = 0;
for (int i : nums) {
a ^= i;
}
return a;
}
}