We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ce0d083 commit 047e536Copy full SHA for 047e536
1 file changed
Java/src/net/kenyang/algorithm/Solution.java
@@ -0,0 +1,13 @@
1
+package net.kenyang.algorithm;
2
+
3
+public class Solution {
4
5
+ public int singleNumber(int[] A) {
6
+ int num = 0;
7
+ for (int i = 0; i < A.length; i++) {
8
+ num ^= A[i];
9
+ }
10
+ return num;
11
12
13
+}
0 commit comments