find first repeating element in array in python code example
Example: python find first duplicate numbers
def findDuplicateNumbers(a):
mySet = set()
for el in a:
if el in mySet:
return el
mySet.add(el)
return -1