Find a number with even number of occurrences
问题 Given an array where number of occurrences of each number is odd except one number whose number of occurrences is even. Find the number with even occurrences. e.g. 1, 1, 2, 3, 1, 2, 5, 3, 3 Output should be: 2 The below are the constraints: Numbers are not in range. Do it in-place. Required time complexity is O(N). Array may contain negative numbers. Array is not sorted. With the above constraints, all my thoughts failed: comparison based sorting, counting sort, BST's, hashing, brute-force. I