Lonely Integer

  • + 0 comments
    def lonelyInteger (a):
    sortedA = sorted(a)  
    lonelyInteger = 0
    for i in range(0,len(sortedA)):
    	lonelyInteger ^= sortedA[i]
            
    return lonelyInteger