Write a function that finds a number in an array that does not have a duplicate. For example [2,5,8,3,8,2,5] - > the answer would be 3.
Anonymous
Sort the array first (complexity n log(n) ) and then pick out the non duplicate (complexity n). So the overall complexity is n log(n). You cannot do better than that.
Check out your Company Bowl for anonymous work chats.