I'm practice some algorithms lessons at Codility, and i'm now at that lesson
To resolve that, I created the algorithm as follow:
A = [9,3,9,3,9,7,9]
for index, item in enumerate(A):
counter = A.count(item)
if(counter == 1):
output = item
print(output)
The algorithm works as well, but he is not performatic... I get just 25% of efficient and I will appreciate opinions about how can I make that code better?
I guess that he count each index can make it not-performatic... any suggestion to improve that?
Thank you!