136. Single Number
easyArray · Bit Manipulation
read the problem on leetcode →
first solved 25 Mar 2024
class Solution:
def singleNumber(self, nums: List[int]) -> int:
dict={}
for i in nums:
if i not in dict:
dict[i]=nums.count(i)
for i,j in dict.items():
if j==1:
return i