Hi Tapan Rachh interesting approach with XOR tough it will only work if duplicated elements are repeating in even times (2,4,6...) also there must be only one unique number for it to work. Same goes to the first method, all the duplicated elements must repeat even number of times. If you try to run for this list x = [1, 1, 2, 3, 1, 3, 5, 2, 5, 7] both 1st and 3rd solution will fail. I would suggest trying it out with two sets, one for seen values and one for unique, since lookup, adding and discarding values from sets are O(1) the whole complexity of the problem can be reduced to O(n) x = [ 1 , 1 , 2 , 3 , 1 , 3 , 5 , 2 , 5 , 7 ] seen = set() unique = set() for i in x: if i in seen: unique.discard(i) else : unique.add(i) seen.add(i) if seen: print( f"Unique items in list: {unique} " ) else : print( "No unique values" )
