Addepar Interview Question

Return the number of unique integers in an array

Interview Answer

Anonymous

Apr 15, 2016

def checkUnique(arr): demoDict=dict() for i in arr: if i in demoDict: demoDict[i] += 1 else: demoDict[i] = 1 for i in arr: if (demoDict[i] == 1): print i