[LeetCode] 136. Single Number
Python
class Solution:
def singleNumber(self, nums: List[int]) -> int:
counter = collections.Counter(nums)
for i, v in counter.items():
if v == 1:
return i
class Solution:
def singleNumber(self, nums: List[int]) -> int:
counter = collections.Counter(nums)
for i, v in counter.items():
if v == 1:
return i
댓글남기기