Microsoft Interview experience | Set 103 (On Campus for IDC)
Microsoft came to our campus to recruit FTEs for MS-IDC. The selection procedure involved a total of 5 rounds, at the end of which 5 candidates were selected.
Round 1 – Online Coding Round
The first round consisted of 3 coding questions on Cocubes with a time limit of 75 minutes. Only the function body had to be coded.
- Given an array of n numbers, replace each element with it’s farthest coprime in the range [2, 250]. Example, the farthest coprime for 2 is 249 and for 243 is 2.
- Given a number n, return the factorial of the number as a string. (The number was passed as an integer parameter and the string had to be returned.)
- Given two trees, tree A and tree B, return the size of the subtree if B is a subtree of A. Otherwise, return zero.
Round 2 – Group fly
This was a written round with 2 questions.
- Given a sorted integer array and a number X, find the number of unique pairs in the array that sum up to X. (similar)
Request format: "GET " Response format: "DATA "
Give test cases for the above request-response query.
Example, a base case could be fetching data from a file on the server and comparing the data with the local copy of the same file.
Technical Interview – 3 rounds
My first round was a design round. I was given 3 scenarios.
- Design a personal assistant like Cortana for your B.tech courses.
- Given the heights and states of all the students in your college, what kind of analysis and grouping will you perform on the available data?
- Consider a client-router-server network. Clients request for information from the server via the router. Every server has a backup in case it fails. How will you ensure data consistency after using the backup server when the main server fails?
My second round had 2 coding questions
- Given a binary tree, print it’s level order traversal with each level on a different line. Every line had to be prefixed with “Level: (level number)”.
- Given the root and two nodes of a binary tree, find the Least Common Ancestor (LCA) of the given nodes. How will you modify the approach if every node has a parent pointer.
The last round had a very simple question. Given a string, report if the string contains all unique characters or not. We were asked to write industry level code and provide test cases as well.
I would like to thank geeksforgeeks.org for providing such exceptional placement support. I did all my preparation from the website alone.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course. In case you are prepared, test your skills using TCS, Wipro, Amazon. Google , E-Litmus and Microsoft Test Serieses.