Microsoft Interview Question for Software Engineer in Tests






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

Test1:
int list1 = {1, 2, 3, 4, 5};
len1 = 5;
int list2 = {1, 2, 3, 4, 5};
len2 = 5;

Test2:
int list1 = {1, 2, 3, 4, 5};
len1 = 5;
int list2 = {0, 0, 0, 0, 0};
len2 = 5;

etc ...

- bpin April 25, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

pseudo code

1. put list 1 in hash table
2. use a pointer, go from beginning to end of list 2 and do hash look-up. if there is a match, point current->next to current->next->next. delete current->next. move on to the next one and repeat til NULL.

3. count how many is left in list 2.

- charles April 29, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Test Cases:

1. Unsorted lists
2. Sorted Lists
3. Lists of different types
4. Lists containing alpha numeric elements.

Any other test cases ?

- SSJ May 23, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

both lists are empty
one of the lists is empty
lists containing different number of elements

any more?

- TestDoc June 14, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

1. lists of equal length
2. lists of unequal length
3. empty lists (both l1 and l2)
4. lists with all 0s or -ve numbers (both l1 and l2)
5. lists will non integer values
6. lists with repeating values in sorted and unsorted order

- Anonymous August 06, 2011 | 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