Amazon Interview Question for Developer Program Engineers


Country: United States
Interview Type: Phone Interview




Comment hidden because of low score. Click to expand.
1
of 1 vote

1.Let us assume that we have X amount of main memory
2. Let us asuume that article B is Y GB.
3. Divide Article B in K Chunks, suchat K*X=Y GB.

Now we read only bring Chunk into memory, and find the number of occurrences of the words using a hastable approach.

Repeat this for all the K Chunks.

Read each chunk into a hastable, O(n) time complexity

- CodingChampioin April 15, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

the words which we get in a ,must be successive

- Anonymous April 11, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

1) Create a trie for all the words in article B.(also keep the frequency of word with the each node in trie)
2) Start taking the word from article A and subsequently find the nearby words wether they are present in the trie or not.
3)If it is present,print the word and its count.

- nikss April 11, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

one time we must get three or more successive words in A,what we count is how many times the three or more successive words appear in B

- Anonymous April 11, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

one time we must get three or more successive words in A,what we count is how many times the three or more successive words appear in B

- Anonymous April 11, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

one time we must get three or more successive words in A,what we count is how many times the three or more successive words appear in B

- Anonymous April 11, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

one time we must get three or more successive words in A,what we count is how many times the three or more successive words appear in B

- Anonymous April 11, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

one time we must get three or more successive words in A,what we count is how many times the three or more successive words appear in B

- Anonymous April 11, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

If the articles are not so big that they cannot fit in the memory then you can simply tokenize each each word. Then step through all N words with a window size of 3, comparing each with 3 input words. If they are the same, increment the counter else move to the next word. Time complexity will be O(n)

- Ngram April 11, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

garimaa.blogspot.in/2012/04/program-14th-in-c.html

the question is bit unclear.I solvd it on what i perceived.

- Solution April 12, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

writing logic makes more sense, rather then writing code.

- Anonymous April 15, 2012 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More