You are viewing a single comment's thread. Return to all comments →
I didn't figure out how to solve in a better way than this:
Python
from collections import defaultdict def lonelyinteger(a): my_dict = defaultdict(int) for i in a: my_dict[i] += 1 for j in my_dict.keys(): if my_dict[j]%2 != 0: return j return 0
Seems like cookies are disabled on this browser, please enable them to open this website
Lonely Integer
You are viewing a single comment's thread. Return to all comments →
I didn't figure out how to solve in a better way than this:
Python