Amazon Interview Question: An arrays of integers is ther... | Glassdoor

Interview Question

Software Developer Intern Interview Seattle, WA

An arrays of integers is there which has all elements

  present odd number of times, only one element is present even number of times, find the number.

Interview Answer

1 Answer


Use a hash table with the array index as the value and the integer as the key. increment the value of a counter integer in another array and return whichever one is even at the end of the day.

Anonymous on Feb 18, 2014

Add Answers or Comments

To comment on this, Sign In or Sign Up.