Answers for "python find first duplicate numbers"

1

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
Posted by: Guest on March-09-2020

Code answers related to "python find first duplicate numbers"

Python Answers by Framework

Browse Popular Code Answers by Language