Single Number
class Solution {
public int singleNumber(int[] nums) {
int result;
for (int num : nums) {
result ^= num;
}
return result;
}
}
最后更新于
这有帮助吗?
class Solution {
public int singleNumber(int[] nums) {
int result;
for (int num : nums) {
result ^= num;
}
return result;
}
}
最后更新于
这有帮助吗?