Amazon Interview Question: In an array in which elements... | Glassdoor

Interview Question

Software Development Engineer Intern Interview

In an array in which elements appear multiple times, it is

  guaranteed that all elements except one will appear an even number of times. Find the element that appears an odd number of times.

Interview Answer

1 Answer


XOR the entire array... the result would be the answer.

Anonymous on Feb 23, 2015

Add Answers or Comments

To comment on this, Sign In or Sign Up.