Amazon.com Interview Question
1,566 Interview Reviews |
Back to all Amazon.com Interview Questions & Reviews
Interview questions and reviews posted anonymously by interview candidates
Interview Question for Software Development Engineer at Amazon.com:
1. Find common elements between two arrays of integers. 2. Find cycles in a graph. 3. Efficiently find duplicate elements in an array of numbers with bounded entries (for example, elements are between 0 and 99). 4. Reverse word sequence in a string inplace. 5. Efficiently find all Pythogorean triplets in a given array of integers. 6. Find all anagrams in a list of words. 7. Set operations.
| Tags: | data structures, algorithms, sorting algorithm, hash tables See more , See less 8 |
See more for this Amazon.com Software Development Engineer Interview
Helpful Question?
Yes |
No
Inappropriate?
Answers & Comments (2)
1 of 2 people found this helpful
O(n) # of comparisons
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 kim:
int i=0, j=0;
while ( i<sorted_array1_size && j<sorted_array2_size ){
if( sorted_array1[i] < sorted_array2[j] ){
i++;
}else if ( sorted_array1[i] > sorted_array2[j] ){
j++;
} else { //must be equal
printf("Common element: %d\n", sorted_array1[i]);
i++; j++;
}
}