single-number py3
This commit is contained in:
5
0136_single-number/python3/solution.py
Normal file
5
0136_single-number/python3/solution.py
Normal file
@@ -0,0 +1,5 @@
|
||||
from functools import reduce
|
||||
|
||||
class Solution:
|
||||
def singleNumber(self, nums: List[int]) -> int:
|
||||
return reduce(lambda r, a: r ^ a, nums)
|
||||
Reference in New Issue
Block a user