Lonely Integer

  • + 0 comments

    This is a simple solution in python, reduce applies a accumulative operation to all elements in the list into a single value Python:

    from functools import reduce
    from operator import ixor
    
    def lonelyinteger(a):
        return reduce(ixor, a)