Skip to content

Commit 3fb2263

Browse files
authored
Create 136-Single-Number.py
1 parent 0b793e1 commit 3fb2263

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

136-Single-Number.py

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
class Solution:
2+
def singleNumber(self, nums: List[int]) -> int:
3+
res = 0
4+
for n in nums:
5+
res = n ^ res
6+
return res

0 commit comments

Comments
 (0)