We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f7cfbb5 commit 4f08f04Copy full SHA for 4f08f04
136. Single Number.java
@@ -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