subject : What are the numbers that appear once in the array , The remaining figures appear three times .
Hash - Dictionaries .
Code :
class Solution:
def func(self , nums):
res = {}
find = []
for i in nums:
if i not in res.keys():
res[i] = 1
else:
res[i] += 1
for k , v in res.items():
if v == 1:
find.append(v)
return find