# 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.

- 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.
- 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.
- 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.

- Find weather number is lucky or not. https://www.geeksforgeeks.org/lucky-numbers/ I gave iterative approach.
- 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.

- Given a string find weather it is valid parentheses. First I gave approach using stack then interviewer asked me to optimize space complexity.
- 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):**

- First quetion was connect node at same lavel.
- 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):**

- 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.
- 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.

## Recommended Posts:

- Microsoft Interview Experience for Summer Internship 2020
- Amazon Interview Experience for Summer Internship 2020(On-Campus)
- Microsoft Summer Internship Off Campus 2020
- Adobe Interview Experience | Summer Internship 2020
- Microsoft TechSetGo Summer Internship Interview Experience
- Microsoft Interview Experience (For Summer 2019 Internship)
- Amazon Summer Internship Interview Experience (On-Campus)
- Amazon Summer Internship Interview Experience | On-Campus
- Dailyhunt Summer internship interview experience (on campus)
- Goldman Sachs Interview Experience (On-campus for Summer Internship)
- Goldman Sachs Interview Experience (Summer Internship, On-Campus)
- Goldman Sachs Internship Interview Experience (Summer Analyst, On-Campus)
- Adobe Interview Experience | On-Campus 2020 Product-Dev Summer Intern
- JP Morgan Internship Experience (2020 Summer)
- Microsoft Summer Internship - 2019 | Campus Recruitment

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.