Skip to content

Commit 6c93caa

Browse files
committed
Time: 2 ms (50.54%), Space: 40.2 MB (86.55%) - LeetHub
1 parent a18e981 commit 6c93caa

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
class Solution {
2+
fun singleNumber(nums: IntArray): Int {
3+
var singleNum = 0
4+
nums.forEach{
5+
singleNum = singleNum xor it
6+
}
7+
return singleNum
8+
9+
}
10+
}

0 commit comments

Comments
 (0)