Single Number 2021-06-16 20:01
public int singleNumber(int[] nums) {
int a = 0;
for (int n : nums) {
a = a ^ n;
}
return a;
}
Runtime | Memory |
---|---|
1 ms | 38.6 MB |
EOF
public int singleNumber(int[] nums) {
int a = 0;
for (int n : nums) {
a = a ^ n;
}
return a;
}
Runtime | Memory |
---|---|
1 ms | 38.6 MB |
EOF