Amazon Interview Question for Applications Developers


Country: India




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

make a trie tree of i words. then scan through the paper once. for every hit in trie we increase the value for that i key. (we have to specify a condition in trie. that we can only update those nodes which are instantiated to 0 and we cannot increase or touch the none nodes.. )

- ashish.singla87 July 25, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

What specifically do you mean by set of 'l' words? Words that begin with the character 'l'?

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

You can do this using HashMap<String,Boolean>. Store these 'I' words in a HashMap and pick work by from a newspaper and check whether the picked words is present in HashMap or not if its present mark it true in Value part of HashMap this way do it for all the words. If the all words value is true than the give set of words are there in Newspaper....
Please share if have any other answer with better time and space complexity
Thank you.

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

why can't we use KMP string matching algorithm ??

- cobra July 13, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

We can. I dont think anything else will work better than KMP

- Noobie July 13, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

we can use trie also

- Anonymous July 13, 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