Microsoft Internship Test Questions

Hi friends...

Today I faced Microsoft Internship Test at Microsoft India Development Center (MS IDC), Hyderabad. It was a really amazing experience. I was asked 5 questions in the written test. And I was among the selected 16 students.

Written test questions:
1] Was given a code to delete a node from a singly linked list. I don't remember the code. But there were 3 to 4 bugs. If you concentrate, you can find it out.

2] Given an array A of size N, implement two stacks starting at opposite ends of the array. Implement Push, Pop, IsEmpty and IsFull functions.

3] You are given a sorted array, possibly with duplicates, you need to return the number of array elements after eliminating all the duplicates from it. Eg: Consider array {1,2,3,3,4,5,6,6,6,7,8,9,9} has a size 13.
You should remove duplicates - {1,2,3,4,5,6,7,8,9} and return the size 9.
int compactArray(int *p, int size)
{

}

4] Design an alarm clock for a blind person. Explain what features will you include.

5] Give a test cases to test the user's login using a fingerprint scanner.

After the written test, there was another written test. It included two problems to be solved in any language C, C++, java, etc...

1] Eliminate all duplicate characters from a string array. For Eg: if you pass "BANANAS" to the function, it should return "BANS". The repeated characters must be removed from the array itself without using another temporary array. It should not be a n square solution.

2] Write a function to check if a given binary tree is balanced. Calculate space and time complexity. Write suitable test cases for the same.


microsoft internship test questions microsoft internship test questions microsoft internship test questions microsoft internship test questions microsoft internship test questions microsoft internship test questions microsoft internship test questions microsoft internship test questions microsoft internship test questions microsoft internship test questions microsoft internship test questions microsoft internship test questions microsoft internship test questions microsoft internship test questions microsoft internship test questions microsoft internship test questions microsoft internship test questions microsoft internship test questions

13 comments:

rony said...

hey..what did u answer for the 4th question!!!
blind person

Abhijit Annaldas said...

Hello Rony,

Alarm Clock for the blind person includes buttons to...
a) Set time
b) Set alarm time
c) Say time
d) Snooze Alarm
e) Stop Alarm
The buttons should be distinct so that they can be sensed by touch. All the buttons have voice feedback.

Anonymous said...

Hey do they allow to write code in python?

Abhijit Annaldas said...

Language doesn't matter. They are more interested in your logic and analytical skills. But, it is better if you can write your code in C.

SWAPNIL CHAUHAN said...

From where one can get more questions on MS Internship written teat questions.

Abhijit Annaldas said...

Work hard on Data Structures, C and Puzzle Solving. Find books for practicing these things. Let me know, if you need any guidance, through feedback page.

Anonymous said...

which book do u recommend for puzzle solving..??

Meghana Kuppa said...

hey how did u answer d removing duplicate question???

Akshat Rustagi said...

how can i prepare for internship?
i mean which book to refer?

Prateek Arora said...

I would very much like to know which book you would refer. I might be giving test for internship soon. Please reply as soon as possible.
Thanks.

Pankaj Mishra said...

hey pls tell me wat to study for internshp very first round ,pool computer based assesment..

Abhijit Annaldas said...

For all those asking about preparing for Microsoft, here are some good books:
1. Programming Interviews Exposed
2. Cracking the Coding Interview
3. Puzzles for Programmers and Pros

Anonymous said...

how did you solved First question of second test ??

Post a Comment