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
An unexpected error occurred. Please try reloading the page. If problem persists, please contact support@hackerrank.com
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]