Microsoft Interview Question for Software Engineer / Developers


Country: India
Interview Type: Phone Interview




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

We can use inverted index. The data structure looks like this

key1 -> p1, p2, p3, p4
key2 -> p5, p6, p7, p8
key3 -> p9, p10, p11, p12

key = the keywords that match the list of adds

"p" stands for posting. For every key there is a list of postings. Each posting looks like this
posting = {index, value}

index = reference to the add
value = condition like where the advertisement is shown and where it is blocked, etc

- Shashank January 13, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
1
of 1 vote

That's quite a question. "Make Google."

- eugene.yarovoi January 13, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

And its asked by Microsoft :D

- Aseem Vyas January 14, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

each add need to have a set of keyword ,geographic location and priority.This priority can be defined based on the money provided by each advertisement. When we have a search two arguments will be shared geographic location and keyword.
First search the geographic location and then the keyword match. If we get multiple entries the ad need to be ordered in the priority which is paying more money

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

each add need to have a set of keyword ,geographic location and priority.This priority can be defined based on the money provided by each advertisement. When we have a search two arguments will be shared geographic location and keyword.
First search the geographic location and then the keyword match. If we get multiple entries the ad need to be ordered in the priority which is paying more money

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

Use a chained hash map. For every key, there exists a linked list, that contains the following structure:
priority;
actual advertisement;
array of countries where it is banned;

When building the list, sort by priority.

- tallitester January 20, 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