Microsoft Interview Experience for SDE Internship (On-Campus 2020)
Recently Microsoft arrived at our campus for an internship. It was open for CSE with CGPA 7 or above and for EEE, ECE with CGPA 8 or above.
Online Test: It was an online round hosted on https://tests.mettl.com/. There were 3 questions with a duration of 90 minutes and to qualify for interviews, one had to solve at least 2 complete and 1 partial. Every student had a different set. The questions in my set were :
- Convert given infix expression to postfix expression. The main problem was that we are given character array instead of string in C++, so that’s why most students found that difficult. Though I used C++17 in which there was a string.
- Given n dice each with m faces, numbered from 1 to m, find the number of ways to get some X. X is the summation of values on each face when all the dice are thrown. This took some time but I used recursion and memoisation and it passed all test cases.
- We are given the 2nd and 3rd term of GP. We need to find the nth term of GP accurate to 6 decimals. Except for this 6 decimal thing, this question was a cakewalk.
I completely solved 3 questions and out of 104 students, 48 were selected for interviews.
Round 1: Firstly, the interviewer asked me for an introduction, and to make me feel comfortable, he asked some questions related to my hobbies. Then we moved to the code part. He asked me to Print all possible words from phone digits
Though I earlier solved this question once, I took my time to build the solution. I explained my backtracking approach to him. He was satisfied. Then he asked to do this iteratively, after some thinking, I told him iterative one also.
Out of 48 candidates, 22 were selected for Round 2.
Round 2: The interview commenced with a brief discussion on my DBMS project, and she asked some questions from the project. Then, she gave me a coding question based on anagrams. Precisely, the question was : we are given a set of strings, say “bad”,”tct”,”abd”,”adb”,”cat”,”tac”. Then I need to print those strings who are the 1st occurrence of their anagram pattern, in this example, the output should be “bad”, “cat”. Initially, I came up with a brute force solution and was told to write the code for the same. Later she told to optimise it. After some brainstorming, I wrote the code of optimised version of it. Then she kept on changing the question slightly in order of increasing difficulty. I gave solutions to all questions. But in order to solve questions with optimised solutions, I took really complicated data structures which she told to simplify. Unfortunately, I was not able to do these questions using simple data structures.
Both rounds’ duration was 1 hour and only 1 coding question was asked per round.
After Round 2, 18 were selected for the HR round from 22 candidates.
HR Round: HR round was 10 minutes long. He asked some basic HR questions. Basically, he was checking communication skills. Afterward, he asked 1 question of DBMS which I was unable to answer.
Finally, 8 students got an internship offer. Unfortunately, I wasn’t one of them.
Please Login to comment...