We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Lonely Integer
- Discussions
Lonely Integer
Lonely Integer
Sort by
recency
|
846 Discussions
|
Please Login in order to post a comment
for i in a: if a.count(i)>1: continue else: return i
The XOR operation will produce 0 for every doubled number. Only a single number will left.
Python Soluthon abusing index subsetting
My Python Solution
I struggled with this one but I finally got it. Celebrating now.
Python solution: