Amazon Interview Report
- 0of 0 votes
AnswerDesign the datastructures for an online book reader system.
- tilo1583 September 25, 2008| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Object Oriented Design - -1of 0 votes
AnswersFind the k max elements in an array of n
- tilo1583 September 25, 2008
Ans: Keep a heap of k with min on top. If you find an element in the array which is greater than the mean, kick the mean out of the heap and heapify(re-heap)
The complexity is O(nlogk)
But coding a heap is difficult so I think in onsite if this question is asked better use an array instead of heap, so the complexity will be O(nk)| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm - -2of 0 votes
AnswersFind phone numbers in a directory containing some billions of files.
- tilo1583 September 25, 2008
I just said use a regular expression, u can use it in grep or u can use it in sed type of scripting or u can write a Java/C++ program| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.