You are viewing a single comment's thread. Return to all comments →
Another way of doing the code: def findLonely(arr): array = list(set(arr)) for i in range(len(array)): if arr.count(array[i]) !=2: return array[i]
Seems like cookies are disabled on this browser, please enable them to open this website
Bit Manipulation: Lonely Integer
You are viewing a single comment's thread. Return to all comments →
Another way of doing the code: def findLonely(arr): array = list(set(arr)) for i in range(len(array)): if arr.count(array[i]) !=2: return array[i]