Message on Whatsapp 8879355057 for DSA(OA + Interview) + Fullstack Dev Training + 1-1 Personalized Mentoring to get 10+LPA Job
0 like 0 dislike
in Interview-Experiences by Expert (30,360 points) | 606 views

1 Answer

0 like 0 dislike

Microsoft  | Summer  Internship | ON CAMPUS


Round 1 :- Coding Round . 

This round was held on There were three questions in a set and different sets for each student.

  1. Problem 1 -  Given the coefficient of a quadratic equation, find the root of the quadratic equation and return the 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. Problem 2 - Given two lists of 1’s and 0’s. If the first element of both lists is the same then remove it from both lists. If Different than in the first list, pop the first element and append it at last. How many numbers will be left on the list ? This question can be done using stack and queue.

They shortlisted 27 students for a Group Fly Round.


Round 2 (Group Fly) Round :- 

  1. Problem 1 :- Find whether the number is lucky or not. 
  2. Problem 2 :- Find whether the tree is binary or not.

We were supposed to write complete code on Paper


 Round 3 : Technical Round 1 

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

  1. Problem 1 :- Given a string, find whether it is a valid parentheses. First I gave an approach using a stack then the interviewer asked me to optimize space complexity.
  2. Problem 2 :- I was given two linked lists and multiplied them and stored them in the third linked list. You can only use the new space for the third list and O(1) extra.


Round 4 :- Technical Round 2 

1. First question was about connecting nodes at the same level.

2. Given a linked list and an integer m. I need to rotate each m node of the 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.


Round 4:- Technical Round 3

1.There is a single core CPU and this code is running 

     “int main(){


      return 0;

      }” (infinite loop) and if we try to open the notepad will it open ? Give reasons. I explained Round Robin scheduling.

2. Given a maze, define an appropriate data structure to store it. Solve the maze and print the path. I was told to make some assumptions if needed. I assumed a square maze and stored it using two maps. To solve this problem I used a backtracking approach. Then he asked me to write pseudo code.


Status : - Selected

by Expert (30,360 points)