You are given an array of unsorted integers. The numbers of this integer contain an odd number of occurrences of all the numbers except for one. One number occurs an even number of times. Can you figure out which number occurs an even number of times?
For bonus solve it without sorting the array.
[7,4,2,6,8,9,2,4,4,5,2,7] Answer: 7
Comments:
Ben - 12 years ago
C#
reply permalink
John - 12 years ago
reply permalink
Vinicius Pires - 12 years ago
reply permalink
PyBanana - 12 years ago
reply permalink