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.
Last Round
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 w3wiki.net for providing such exceptional placement support. I did all my preparation from the website alone.
Contact Us