Amazon Interview Question: Given an array of positive in... | Glassdoor

Interview Question

Software Engineer II Interview

Given an array of positive integers, print out all the

  numbers which are repeated an even number of times ? Can you do this without using additional storage ?

Interview Answer

2 Answers


If you use additional storage such as a hash, you can do this in O(n). if we don't then worst case would be nlogn as we can sort and then the same number should be adjacent to each other.

Anonymous on Feb 18, 2011

This post has been removed.
Please see our Community Guidelines or Terms of Service for more information.

Add Answers or Comments

To comment on this, Sign In or Sign Up.