Microsoft Interview Question for Software Engineer / Developers






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

I think TRIE can b used. Using TRIE suggestions can also be given.

- Tulley March 28, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

FWIW, I said trie during the interview and justified it with all of the repetition of letters in words. my structure had the following fields:

1. char data
2. int is_legitimate_ending (e.g. can a word end at this node)
3. node **children (dynamically allocated array of node pointers)

I debated using a double pointer for children or an array of pointers (e.g. size 256 if assuming ASCII) but went with the double ptr because you can (1) save space and (2) include more than 256 characters. array would have had a more constant time lookup than iterating through the dynamically allocated array though.

- woohoo March 28, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

@woohoo: just my curiosity, how much time you were given to code the entire TRIE stuffs, like, building, inserting, searching.

- anonymous March 28, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

I had about 30 minutes for the problem. I only had to define the structure and write the verify() method. I did not have to code building & inserting.

- woohoo March 28, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Is the verify implementation mean: if the word is not found in Dictionary its misspelled else correct word.

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

@searching, yes that is correct.

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

Thank you so much for posting this question!

- xD March 30, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

you're welcome! :)

- woohoo March 30, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

@woohoo

keep up the good work :) FTW

- Anonymous June 20, 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