Skip to content

Commit 4f08f04

Browse files
committed
commit
1 parent f7cfbb5 commit 4f08f04

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

136. Single Number.java

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
class Solution {
2+
public int singleNumber(int[] nums) {
3+
int same_num = 0;
4+
5+
for (int idx = 0; idx < nums.length; idx++) {
6+
same_num ^= nums[idx];
7+
}
8+
9+
return same_num;
10+
}
11+
}

0 commit comments

Comments
 (0)