#There is two ways of doing this use a hash(dict) to parse the array and store the key and value. #Then loop through the hash and return the key whose value is 1
#Second way is to use the XOR operation and return the whatever value is remaining. The logic is #whenever you XOR an integer with itself it gives a 0 and 0 XOR’ed with integer is the integer #itself.
def lonelyInteger( arr):
value = 0
for element in arr:
value = value ^ element