Amazon.com Interview Question
1,572 Interview Reviews |
Back to all Amazon.com Interview Questions & Reviews
Interview questions and reviews posted anonymously by interview candidates
Interview Question for Software Engineer at Amazon.com:
In-House interview: 1. Given two int arrays, return a third int array that contains all values in the first int array that aren't in the 2nd. If a value is duplicated in the first int array, only return it once in the output array. 2. Model a deck of cards
Helpful Question?
Yes |
No
Inappropriate?
Answers & Comments (2)
Set<int> mySet1 = new HashSet<int>(Arrays.asList(array1));
Set<int> mySet2 = new HashSet<int>(Arrays.asList(array2));
mySet1.removeAll(mySet2);
return mySet1;
Helpful Answer?
Yes |
No
Inappropriate?
To comment on this
question,
Sign In with Facebook or
Sign Up



0 of 0 people found this helpful
by Interview Candidate: