1st round :-
It started with a formal discussion first they asked about the favorite subjects .
Then the discussion moved on the project i have done . I had done project on
HPC using MPI so he asked me to draw flow diagram of my project .
Then he gave a problem to find the square root of a floating number upto
4 decimal places precision and asked me write code for that . Then also asked me to write test cases for that . It took me 40 minutes to write the complete code as he was asking my approach every 5 minutes and asked me to modify my approach wherever he found that the logic was not efficient .
2nd round :-
2nd interviewer asked me write the test cases of an multi story building elevator .
Then he asked me write a code for a given array
aaabbccdddaa
and output should be
a3b2b2d3a2
and that should be done in place
# Then he asked to find 2 numbers in a given random array whose sum is closest to a given number .
Then he asked me to sort a given array in such a way that all odd number should be descending sorted and even with ascending sorted order like if array contains
1 2 3 4 5 6 7 8
then output should be
7 5 3 1 2 4 6 8
and it was to be done in place only .
3rd round
He asked me write code checking if a linked list is palindrome or not .
He then asked me write test cases for that .
He then asked me about write a code for a given problem which according to me
was the toughest so far , the problem was that a linked list contains
2 19 _ _ 3 47 _ _ _ 2 20 _ _ ..............and so on
I have to fill those empty nodes with numbers whose sum is equal to the numbers
occurring just before the gaps and the number of gaps is determined by the node
which is at 2 distance before the gaps with the limitation that their would be no
repetition in list only the nodes designating the number of gaps can be repeated
for example 2 20 should be broken in two parts like 19 1
3 47 should be broken in three parts like 42 2 3
and not in 44 1 2 because 1 already occurred in the list due previous partition
I did this by using Hash map and he was satisfied .
4th round
The interviewer was GM of MSIDC so I though that round would be easy but
again he asked me write code for stricmp and the boundation was that i was not allowed to use so i had to implement strlen,toupper,tolower also .
Then he asked me write test cases for that .
Then he asked me how to validate a string which is given input to a atof function
the moment i answered that it can done with a parsing table as it can be thought for validating a state machine and using a predictive parsing table he answered that he was done with the interviews and I did fine .
Finally i was selected !!!!!!
So all i want say that its not hard to crack MSIDC or any company's interview you just need to have the basic knowledge and go through as much problem of data structures as you can for microsoft and do not make any single mistake on basics else they will kick you out and the most important thing that you should never leave a question by just reading its code or logic its always good to code the problem even after seeing the solution.
It started with a formal discussion first they asked about the favorite subjects .
Then the discussion moved on the project i have done . I had done project on
HPC using MPI so he asked me to draw flow diagram of my project .
Then he gave a problem to find the square root of a floating number upto
4 decimal places precision and asked me write code for that . Then also asked me to write test cases for that . It took me 40 minutes to write the complete code as he was asking my approach every 5 minutes and asked me to modify my approach wherever he found that the logic was not efficient .
2nd round :-
2nd interviewer asked me write the test cases of an multi story building elevator .
Then he asked me write a code for a given array
aaabbccdddaa
and output should be
a3b2b2d3a2
and that should be done in place
# Then he asked to find 2 numbers in a given random array whose sum is closest to a given number .
Then he asked me to sort a given array in such a way that all odd number should be descending sorted and even with ascending sorted order like if array contains
1 2 3 4 5 6 7 8
then output should be
7 5 3 1 2 4 6 8
and it was to be done in place only .
3rd round
He asked me write code checking if a linked list is palindrome or not .
He then asked me write test cases for that .
He then asked me about write a code for a given problem which according to me
was the toughest so far , the problem was that a linked list contains
2 19 _ _ 3 47 _ _ _ 2 20 _ _ ..............and so on
I have to fill those empty nodes with numbers whose sum is equal to the numbers
occurring just before the gaps and the number of gaps is determined by the node
which is at 2 distance before the gaps with the limitation that their would be no
repetition in list only the nodes designating the number of gaps can be repeated
for example 2 20 should be broken in two parts like 19 1
3 47 should be broken in three parts like 42 2 3
and not in 44 1 2 because 1 already occurred in the list due previous partition
I did this by using Hash map and he was satisfied .
4th round
The interviewer was GM of MSIDC so I though that round would be easy but
again he asked me write code for stricmp and the boundation was that i was not allowed to use
Then he asked me write test cases for that .
Then he asked me how to validate a string which is given input to a atof function
the moment i answered that it can done with a parsing table as it can be thought for validating a state machine and using a predictive parsing table he answered that he was done with the interviews and I did fine .
Finally i was selected !!!!!!
So all i want say that its not hard to crack MSIDC or any company's interview you just need to have the basic knowledge and go through as much problem of data structures as you can for microsoft and do not make any single mistake on basics else they will kick you out and the most important thing that you should never leave a question by just reading its code or logic its always good to code the problem even after seeing the solution.