136. Single Number
Single Number
Solution
public class Solution {
public int singleNumber(int[] nums) {
int temp = 0;
for(int i : nums) {
temp ^= i;
}
return temp;
}
}Last updated
Single Number
public class Solution {
public int singleNumber(int[] nums) {
int temp = 0;
for(int i : nums) {
temp ^= i;
}
return temp;
}
}Last updated