Google Interview Question for Software Engineer / Developers


Country: United States




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

When a phrase search is done, there could be multiple ways based on how the search engine is implemented. Will explain one way here.
Each of the words of the phrases are searched on the inverted index and the posting lists of the corresponding words will all be retrieved. We can do a repeated intersection of the sets of documents in the posting lists..
In the document set where all the words are present, a more detailed search for the specific location of the word in the documents where each of these words occur. The result will have those documents that have them in the consecutive positions in each of the documents in the specified order.
Sometimes the phrases may be stored as they are too.. For instance to search phrases like "To be or not to be", which consists of all stopwords..
If the n gram frequencies in words or phrases are stored as in vector space models, phrase searches are simpler.

- Anon August 24, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
3
of 5 vote

Check this link
en.wikipedia.org/wiki/Inverted_index

- oldtimer August 27, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
1
of 1 vote

can anyone pls explain the entire process in searching else can anyone provide the link to learn??? because i tooo had this same question in my tech interview which i couldn't satisfy them pls...

- ram rs September 10, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 1 vote

Please elaborate the answer in simpler way

- Anonymous August 27, 2013 | 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