Skip to content

Commit 1a88ccf

Browse files
iamAntimPalAntim-IWPIamShiwangi
committed
Update 136. Single Number.py
Co-Authored-By: Antim-IWP <203163676+Antim-IWP@users.noreply.github.com> Co-Authored-By: Shiwangi Srivastava <174641070+IamShiwangi@users.noreply.github.com>
1 parent db4615b commit 1a88ccf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
class Solution:
2+
def singleNumber(self, nums: list[int]) -> int:
3+
return functools.reduce(operator.xor, nums, 0)

0 commit comments

Comments
 (0)