Microsoft Interview Question for Software Engineer / Developers


Team: Bing
Country: United States
Interview Type: Phone Interview




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

Use a TRIE to do that...!

- Arghyadip January 14, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
2
of 2 vote

this is more complicated then this... you need to get profiling to the user. you can guess to complete the search sentence using trie and profile + use the type of keyword you were guessing like if software then add download or something like that, which has maximum search with that keyword... many thing also need to be consider like location and more..

- Sanjay Kumar January 15, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

true as word completion algorithm, and profiling as a sentence completion rules,which is more complicated.

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

true as word completion algorithm, and profiling as a sentence completion rules,which is more complicated.

- Ll January 16, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

true as word completion algorithm, and profiling as a sentence completion rules,which is more complicated.

- Ll January 16, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

true as word completion algorithm, and profiling as a sentence completion rules,which is more complicated.

- Ll January 16, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

true as word completion algorithm, and profiling as a sentence completion rules,which is more complicated.

- Ll January 16, 2012 | Flag
Comment hidden because of low score. Click to expand.
-1
of 1 vote

you can use the "Levenshtein distance" or "fuzzy string searching" or "Knuth–Morris–Pratt algorithm" to do that. Designing such system is complex task.

below is simple algo that I thought it will work.

1> capture a string while user is typing
2> for each such a string apply above algorithm
3> show the results to user and goto step 1

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

This is a useless and wrong answer. Let me breakdown the stupidity at display here:

1. "For each string, apply above algorithm" - Let's try applying the algorithms you have proposed:

1. KMP: For you to be able to apply this algorithm, you will need a large string that contains all possible words and the search will take O(n) time in the worst case.

Furthermore, you might be able to hit upon a word, but how do you get to other words that show up as part of auto-complete. Do you pick the next word, the previous word? How do you remember the user's last choice (do you use a different data structure for that?)

2. Use Levenshtein distance: And how exactly do you think we should use this? You are not trying to fix a spelling error, you are trying to find a partial match. Just putting down a fancy term, doesn't mean that it is actually usable. Try to think before you start posting random nonsense.

3. Fuzzy string searching: Oh boy! Here we go again. What exactly is "fuzzy string searching"? A Google link would be helpful or maybe you could codify the fuzziness in your head to enlighten us all?

To clarify, that all I am adding is not just criticism, the first post about Trie is absolutely correct and with a bit of modification, can be used to store frequency etc. Do not try to post answers without thinking about them first.

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

Owned!

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

"Levenshtein distance" with "TRIE" will do the better job
[//]stevehanov.ca[/]blog[/]index.php?id=114

- J Q January 16, 2012 | Flag


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