Microsoft IDC Interview Experience | Set 156 (Off-Campus for Full Time)
I applied to Microsoft through referral program for full – time position of software development engineer. All of the candidates who applied through referral were invited for an online coding test on co-cubes platform after 2-3 weeks.
Online Coding Round (On Co-Cubes) :-
Three questions were given in 75 minutes of time to solve. Solving on co – cubes platform is a nightmare by the way, no auto – completion, cannot even copy – paste or test your code manually.
- Question 1 (2 – Marks) : Given a singly linked list, with some positive numbers (valid numbers) and zeros (invalid numbers). Convert the linked list in such a way that if next valid number is same as current number, double its value and replace the next number with 0. After the modification, rearrange the linked – list such that all 0’s are shifted to the end.
E.g. 2 -> 2 -> 0 -> 4 -> 0 -> 8
Ans: – 4 -> 4 -> 8 -> 0 -> 0 -> 0
- Question 2 (3 – Marks) : I do not remember. It was array – based.
- Question 3 (5 – Marks) : Write a function that accepts root of binary tree as its argument and return the sum of all leaf nodes at maximum depth from root.
………. / \
Ans :- 2 + 1 = 3
The system testing of solutions was done after your submission of all 3 questions, and result is not shown to you (whether all 3 went correct or not). You were however given a very weak test case on co-cubes to check your solution, which easily showed false positive.
You have to solve ALL 3 questions to qualify this round.
All students who qualified coding round were invited to Microsoft Hyderabad for further interview process.
Group Fly Round : –
Around 150 students appeared for group – fly round. It was a pen – paper test. We were provided with only one question, to be solved in 45 minutes.
- Question – Given a string, partition it in minimum number of substrings such that each partitioned substring is a palindrome. Output the minimum number of partitions required. It is a standard dynamic programming question, https://www.geeksforgeeks.org/dynamic-programming-set-17-palindrome-partitioning/.
We have to write the whole program from input to output, along with some test cases (They wanted to test your program testing skills for corner cases). You are allowed to use any language.
Note : – Judging criteria was correctness of the code than anything else. Try to write clean code as possible and use meaningful variable and function names. People who had correct running code (Even in exponential time complexity for DP) were selected than faster codes with errors.
Nearly 30 – 35 students were selected for next round.
Round 1 (Technical) : –
Interviewer first thoroughly went through my resume. He was impressed with my competitive coding profile, and then asked me to explain one of my project. He then asked me two algorithmic questions.
- Question 1 – Given a tree rooted at a certain node, find the maximum height, also print all the nodes on the path on maximum height. https://www.geeksforgeeks.org/write-a-c-program-to-find-the-maximum-depth-or-height-of-a-tree/
I had to completely code it on paper from input to output, and then thoroughly explain the whole code.
- Question 2 – Given a N X N matrix with positive, zero or negative elements, find the sub – matrix with largest sum. https://www.geeksforgeeks.org/dynamic-programming-set-27-max-sum-rectangle-in-a-2d-matrix/
Even after lot of thinking, I was not able to provide the optimal O(n^3) solution, and offered him brute – force + preprocessing solution of O(n^4). He was not helping with hints. After sometime, he asked me to the code solution I got, and interrupted me and said it’s ok as I was halfway through writing the code.
The interview went for around one hour.
Round 2 (Technical) :-
This was the hardest interview round. Interviewer literally asked me everything under the sun.
Interviewer first asked me to introduce myself, as she went through my resume. She inquired about my competitive programming profile, and my hobbies. I was asked few OS questions on multi – threading and it’s real – life implementations. Afterwards, I was provided with a design problem,
- “Imagine you are a project manager of Microsoft, design a messenger service app like WhatsApp”. You have to explain all the points and features diagrammatically, such that even a non – technical person can understand.
She then noted down four sectors from my resume, namely, data structure and algorithm, programming language (C++), DBMS and Client – side scripting, and then asked me to rate myself in all four.
Firstly, she started basic questioning like, “what is a tree”, and progressed to BFS & DFS, their algorithm, uses and where one is preferred over another. This lead to thorough discussion on Dikstra’s shortest – path algorithm. Underlying reasons was to check your in-depth knowledge.
After DSA, discussion moved to C++, pointers, their uses and difference between struct, class and their pointer handling. Discussion went around OOPS concepts like polymorphism, function overloading and overriding.
She then proceeded with networking questions. This discussion went on like a recursive DFS, as everything we discussed, lead to some other topic. Few topics and questions I remember were, “What is a IP”, “Why a machine needs a IP”, “What is a static and dynamic IP, and when one is preferred over another”, “Firewalls”, “Encryption Methods / Cryptography”, “about HTTP and HTTPS protocol” and thorough questions on “Client – side & Server – side scripting”. Discussion also veered to off-topic questions like, we have to design a robot / system which recognises emotions by voice, how & what parameters will you use to do the same ?
Finally, we finished discussion on networking, and she asked me two simple DBMS SQL queries, one being “print the second largest number in the table”.
This interview went around for more than one and half hours. Interviewer was very helpful and friendly, and gave hints whenever I was stuck.
Note : – Do not panic if you are stuck, or not able to answer. Be honest to what to do or do not know. If the question is factual, you can admit you don’t know, rather than blabbering non – sense. However, for thinking / brainstorming questions, it is better to be persistent and go on trying.
Round 3 : –
Now, only 10 – 12 students were remaining. Few people had a HR round for this, few didn’t even had this round. Mine was technical round.
My interview was taken by a senior person. He asked to me introduce myself, and then proceeded to ask about all my projects. Throughout the interview, he listened without cross – questioning me. After that, he asked if I had any questions for him. I asked few questions and it was over.
Final Result was declared within half and hour, and 9 people were selected at last. Fortunately, I was one of them.
The total interview process took nearly 11 hours.
Clear concept of data structure and algorithm is necessary, alongside knowledge of OOPS concepts, OS and DBMS. Project’s are also necessary, and having some interesting projects surely attracts curiosity of the interviewer. It should be kept in mind they look for a balanced candidate with knowledge in different fields.
During interview, keep on communicating with the interviewer, be curious and cross – question them.