Microsoft Interview Question for Software Engineer / Developers






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

Use hash on each word and keep counter on the hash table. Add new item to hash bucket in case of collision

- Tanvir March 09, 2007 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Use a hash table and a min heap. Insert on hash and check count on min heap.

- knap May 13, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Trie ? can minimize the space required in case of two words having common chars like tear, tea ? maintain count at the leaves..

- sid September 11, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

How about using associative arrays. Here we can implement it using map<string,int>.
so every word that comes in check if it is already present in map.If it is increment the int value,else add it to the map and make int value 1.

- Amit October 21, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

I think B+ tree should should be useful in this case.

For a b-order B+ tree with h levels of index:

Inserting a record requires O(log n on base b ) operations
Finding a record requires O(log n on base b) operations
Removing a (previously located) record requires O(log n on base b) operations

- rahul.s July 18, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
-2
of 4 vote

heap of size 10

- Neetu December 28, 2007 | Flag Reply
Comment hidden because of low score. Click to expand.
-2
of 2 vote

I will use huffman algorithm where will take min count out of 10 words and start making binary tree.

- Deepak Garg May 26, 2008 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Completely off.

- Anonymous May 13, 2009 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Completely off.

- anon May 13, 2009 | 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