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 - 10 years, 3 months ago
C#
reply permalink
John - 10 years, 3 months ago
reply permalink
Vinicius Pires - 10 years, 3 months ago
reply permalink
PyBanana - 10 years, 3 months ago
reply permalink