Round 1: I received a call from one of the recruitment firms 1 week before the interviews which were held in Microsoft Noida Office. The first round was a written round where we were given 2 coding questions and time given was 45 mins.We had to write code on paper.
1.) Given start and end times of people visiting a park find the maximum number of people at any point of time.
Start time End time
2.) Given a stream of 3 kinds of objects say ObjectType ob1, ob2, ob3, arrange them in such a way that equal objects are next to each other or come together.Given a compare() function as shown below:
int compare(ObjectType ob1, ObjectType ob2);
= 0 if (ob1==ob2),
After 15-20 mins of evaluation I was called for my F2F interview.
1.)Discussion on current project, he asked me several questions on how the web services are hosted, how do we take care of large number of incoming requests, why don’t we host it on cloud etc.
Then he asked me to design a stack which returns minimum element at any point of time.I explained to him the below solution wrote the complete code for it.He mainly checked for corner cases and error handling mechanisms I used.
Further he asked me to write all test cases and how will I test my design, how I will unit test my function. Next he asked me to make the class Generic.
He asked one more coding question:
Reverse a linked list in groups of k.
It is very important to write clean code which covers all the test cases in short production level code.
1.) Discussion on current project in detail.
2.)Write a code to find whether a string is a palindrome or not.
3.)Write a code to find whether any permutation of a given string can form a palindrome. I first calculated the frequency of each letter and depending on even and odd length palindrome returned the output.The latter should contain one letter with odd frequency.
4.)Write a code to find which permutation of a string can result in a palindrome.
First create all permutations of a given string and then check which one is palindrome.
5. Design a wall clock which will be displayed on an app. As and when time changes the needles should align their position accordingly.
I created a class diagram for classes Clock, Needle and how they will be related.He asked me what functions I will use, design patterns, whether to use it inheritance or composition and why?
This was the Hiring Manager round he first asked me how did my previous rounds go, I told him where I did really well and where I could have done better.He asked me to optimize the coding question I solved in written round
where expected complexity was O(N).
Then he asked me a coding question where I had to find the second largest element in a BST where I should not traverse the entire tree.
I had to write complete code with proper syntax and covering all test cases without using global variables.
Further he asked me why do I want to change my job, why Microsoft?
After this round the HR told me that I am selected!! 🙂
Thanks to GeeksForGeeks which helped me throughout my preparation.
- Microsoft Interview Experience | (SDE-2 for 3 Years Experienced)
- Microsoft interview Experience | Set 48 (For 1.5 Years Experienced)
- Microsoft interview experience: | Set 167 (7 Years Experienced)
- Microsoft Interview Experience | Set 111 (For 1.5 Years Experienced)
- Microsoft Interview Experience | Set 112 (For 4.5 Years Experienced)
- Microsoft IDC interview Experience | Set 47 (For 1.7 Years Experienced)
- Microsoft Interview Experience (3 years Experienced)
- Microsoft Interview Experience | Set 109 (2 years experienced)
- Microsoft Interview experience | Set 115 (4 Years Experienced for IDC)
- Microsoft Interview Experience | Set 154 (For 1.5 Years Experienced)
- Microsoft Interview experience | Set 114 (2.5 Years Experienced for SDE2)
- Microsoft Interview Experience for Software Engineer-2 | 3+ years experienced
- Microsoft Interview Experience for Hyderabad Office Team(2 years Experienced)
- Microsoft Interview Experience | Senior Software Engineer (4 Years Experienced)
- Oyo Interview Experience | 3.5 years Experienced for SDE-2
- Oyo Interview Experience | 3 years Experienced for SDE-2
- OYO Interview Experience | Set 11 (For 2 years experienced)
- Vizury Interview Experience | Set 2 (1.5 Years Experienced)
- Cisco Interview Experience - 3+ Years Experienced
- NoBroker.in Interview Experience | For 4 years experienced
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.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.