employer cover photo
employer logo
employer logo

Amazon Lab126

Part of Amazon

Is this your company?

Amazon Lab126 Interview Question

Find the first unique integer from a set of arrays

Interview Answer

Anonymous

Mar 19, 2018

def findFirstUnique(array): for i in range(0,len(array)): x = array[0] array.remove(array[0]) if x in array: continue else: print(f'First unique number found and it is: {x}') break def main(): l = [1,3,5,4,2,1,6,3,6] z = findFirstUnique(l) if __name__ == '__main__': main()