Microsoft Interview Experience (On-Campus for Internship)

Online Coding Round:

It was conducted on Cocubes. There were 3 questions to be solved in 75 mins. My questions were:

  1.  Given a character array, find the average of ascii characters in the array. Ex:- i/p = ab12, o/p = 73.5   (2 marks)
  2.  Evaluation of a given infix expression(as character array). Ex:- i/p = 4-5*14/7+2, o/p = -4  (3 marks)
  3.  Find the lowest number possible by removing k digit from a given number. Ex:- i/p = 4312389, k=3, o/p = 1238  (5 marks)

Out of 200 students, approximately 60-65 where selected for pen & paper round. Gettting more than 5 marks was enough for clearing this round. Regarding cocubes, it is a simple ide where one can only test the code for compilation error and few basic test cases. We where not able to run the code for custom test-cases, but you can certainly modify the input string for checking.

Pen & paper round:

This round consisted of 7 short questions(based on C lang.) of 3 marks each and one coding question of 6 mark. The coding question was Detecting and Removing Loop from a Linked List. All the questions where compulsory. Around 24 students moved forward for face-to-face personal interviews.



Round 1:

Interviewer went through my cv and asked some question from OOPs, like what are virtual functions and destructors, and difference between new and malloc. Then how to deallocate memory and what happens for the combination of :- (new and free) and (malloc and delete). Then he asked me 2 coding questions:

  1. Given a Binary Search Tree, convert it into a Doubly Linked List. He asked me to write some test cases.
  2. Given a row-wise sorted n*n matrix, Print the elements of matrix in non-decreasing order. Space complexity of O(n) was allowed. I used min-heap to solve it.

For the questions try to 1st tell your approach and use test cases to dry run your approach. Then move to writing code, when asked.

Round 2:

I was asked :

  1. There are two parallel lines. One line has n points and other m points. Points are connected to each other in a zig-zag manner. Find the number crosses i.e, points of intersection of connections. Similar to this problem-  https://www.geeksforgeeks.org/counting-cross-lines-array/
  2. A set on N rectangles, each having sides aligned to x-axis and y-axis, was given. Another rectangle was given and I had to check how many rectangles from the set completely lie inside the new rectangle. We can sort the set along x-axis and y-axis, and find the no of rectangles by using 4 binary searches.
  3. Exception handling in c++ and java.

One more round was there for selected students. Total 6 students was selected.

Write your Interview Experience or mail it to contribute@geeksforgeeks.org



My Personal Notes arrow_drop_up

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.


 
Practice Tags :

Recommended Posts:



2.6 Average Difficulty : 2.6/5.0
Based on 3 vote(s)






User Actions