Microsoft Interview Experience | Set 169 (SDE 2 for 3.5 years experience)

1st round(online coding):

  1. Given an array that contains both positive and negative integers, find the product of the maximum product subarray.
  2. Sort an almost sorted array where only two elements are swapped.
  3. Given an integer value and a pointer to the head of the linked list, delete all the nodes from the list that are greater than the specified value.

2nd Round(DSA) :

  1. Find median of BST. BST can have duplicates as well. Had to write production level code using recursion and backtracking both. I told him various approaches. However, he was looking for the median in one scan only using two pointers.

3rd Round(DSA):

  1. Introduction and detailed project discussion.
  2. Find the majority element in an array. The majority element is the element that occurs more than half of the size of the array. We discussed various approaches and finally had to write working code for one of them.
  3. Left View of a Binary Tree. Working code was required and some questions from the code. Like, why you used static variable and how will you do it without using any static and global variables.
  4. Some questions from pointer, like,

Structure of linked list is :

struct node{
     int val;
     node *next;
}

So, what will happen if you remove * from node *next.
And some more deep questions from pointers.



4th Round(Design).

  1. Design a real-time URL spam filtering service. We have information about billions of URLs whether they are spam or no. We need to come up with an architecture solution to store all the URLs and retrieve the information in minimum latency. There were some constraints, like, you have been given a very small memory. So, you can load only a few URLs in memory for the query.
  2. Implement your own malloc and free for application x, which should control the heap memory usage of the application x. Discussed various approaches for assigning memory for a request.

5th Round(HR)

  1. Project discussion and some behavioral questions.
  2. Any offer in hand?

6th Round(Hiring manager):

  1. Introduction.
  2. Detailed discussion of recent project.
  3. Some behavioural questions.
  4. Given preorder traversal of a binary search tree, construct the BST. Full working code was required.
  5. Given events, like, switch on, switch off, pull chair. Design an architecture to count the number of events in given time frame. Time frame can be minutes, hour or day.


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 Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



Improved By : Vikas Gupta



Article Tags :
Practice Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.