```python
class Solution_0:
def __init__(self,nums):
self.nums = nums
def singleNumber(self):
n = sorted(self.nums)
for i in range(len(n) - 1):
if n[i] != n[i + 1]:
return n[i]
return
```python
class Solution_1:
def __init__(self,nums):
self.nums = nums
def singleNumber(self):
dict_nums = {}
for n in self.nums:
if n not in dict_nums:
dict_nums[n] = 1
else:
dict_nums[n] = 0
for k in dict_nums.keys():
if dict_nums[k] == 1:
return k
return