Microsoft Interview Question for Software Engineer / Developers






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

in C++ i would suggest STL Map.

Map<String,String> Dictionary;
    Dictionary[word] = meaning ;

Advantage :
Maps store data in sorted order , will be beneficial when u need to print all words
starting from particular character

insertion and search in log n
search can be improved if we save iterators for words starting from each character
then when search for particular word is requested , get the saved iterator for first character of that word and search word from there .

- sachin323 October 06, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

an AVL tree would be the best option i think as it has O(log n) search insert and removal.

- kc October 07, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

use Trie

- shashi @ iiit October 07, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

en.wikipedia.org/wiki/Acyclic_deterministic_finite_automaton

- saurako October 18, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Dictionary = Trie

- erm October 23, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Could you post some good link for trie? Mostly implementation one.

- Shrikant October 24, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

I would have to say AVL or RedBlack tree is best as it has a big O of log(n) both for insertion and searching

- Biruk Solomon November 04, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Trie is the best option for implementing dictionary. It's like they are made for each other :)

- code_indigo November 17, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

please see en.wikipedia.org/wiki/Directed_acyclic_word_graph

- sp November 19, 2010 | 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