Microsoft Interview Experience (On Campus for 2020 Summer Internship)

Online Round:

This round was held in mettl.com There were three quetions in a set and different sets for each students.

  1. Given coefficient of a quadratic equation find root of quadratic eqation and return value with at most three precision. Like if answer is 3.0 then return 3.0 itself but if answer is 3.1249 theen return 3.125. Easy question, find discriminant and apply formula.
  2. Given two list of 1’s and 0’s. If first element of both list is same than remove it from both list. If Different than in first list pop first element and append it at last. How many numbers will left in list ? This question can be done using stack and queue.
  3. This quetion is based on sorting two arrays simultaneously.

They shortlisted 27 students for a Group Fly Round.



Round 1 (Group Fly):

There were two quesions and we were told to write complete code on paper.

  1. Find weather number is lucky or not. https://www.geeksforgeeks.org/lucky-numbers/  I gave iterative approach.
  2. Find tree is binary or not. https://www.geeksforgeeks.org/a-program-to-check-if-a-binary-tree-is-bst-or-not/

Round 2 (Technical Round – 1):

First of all, interviewer asked me about my projects related questions for about 10 minutes.

  1. Given a string find weather it is valid parentheses. First I gave approach using stack then interviewer asked me to optimize space complexity.
  2. I was given two linked list and multiply them and store it in third linked list. You can only use new space for third list and O(1) extra.

I was asked to write complete code for both quetions in paper (C or Cpp).

Round 3 (Technical Round – 2):

  1. First quetion was connect node at same lavel.
  2. Given linked list and and interger m. I need to rotate each m nodes of link list. For example if my linked list is 1–>2–>3–>4–>5–>6–>7–>8–>9–>10–>11–>12–>13–>14 and m is 4 then return 4–>3–>2–>1–>8–>7–>6–>5–>12–>11–>10–>9–>14–>13. Constraints: Time Complexity O(n). Space Complexity O(1). Node value can not be changed.

In this round I was also asked two write complete code.

Rounnd 4 (Technical Round – 3):

  1. There is single core CPU and this code is running “int main(){while(1);return 0;}” (infinite loop) and if we try to open notepad will it open ? Give reasons. I explaind Round Robin scheduling.
  2. Given a maze, define appropriate data structure to store it. Solve the maze and print the path. I was told to make some assumptions if needed. I assumed square maze and stored it using two maps. For solving I gave backtracking approach. Then he asked me to write pseudo code.

Thanks to GeeksforGeeks as you can find most of the questions on this platform.

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.