Pergunta de entrevista da empresa Amazon

Find the number which repeat odds times in a array.(only one such number)

Resposta da entrevista

Sigiloso

7 de abr. de 2011

Perform exor operation. res = array[0] for(i=1 to n-1) { res = res (EXOR) array[i] } res will be that number repeated odd times. others will cancel each other out during XOR.

2