You are viewing a single comment's thread. Return to all comments →
Here's a simple approach using XOR operator:
def lonelyinteger(a): xor = 0 for i in range(n): xor = xor ^ a[i] return xor
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 →
Here's a simple approach using XOR operator: