Amazon Interview Report
- 0of 0 votes
AnswersGiven a point p and a list of points, find k point closest to the point.
- Chummi May 11, 2010
I told him the naive method keeping track of the min distance and already returned points we could find next closest point in every loop. He asked me if i could improvise it using some sort of data structures then i told him range queries.| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm - 0of 0 votes
AnswerWhat are prepared statements? what is indexing and also what is sql injection and how do you prevent it.
- Chummi May 11, 2010| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Database - 1of 1 vote
AnswersGiven an array of integers, find two integers whose sum is x? He asked me to give him different approaches.
- Chummi May 11, 2010
1. Naive method using two loops. ie. O(n2).
2. Uisng sorting as a preprocessing step and binary search. ie. O(nlogn).
3. Hashing. O(n).
He also asked me the end cases that should be handled. In hashing method negative numbers cannot be handled.
The interviewer was looking for all the approaches.| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Arrays - 0of 0 votes
AnswersGiven a furniture which can be made of wood or metal and can be a chair or a table and a type of stress like fire and water, simulate a system or give me a design to handle all this.
- Chummi May 11, 2010
Furniture is a class and class chair and table extend it. Test is a class which takes the object furniture and type of stress and return bool type. He then asked me what if i keep increasing the type of stress. So my approach for this was to have a class or function dedicated for each type of stress and just pass the furniture object. There was a lot of discussion on the same lines.| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer