Microsoft on Campus Placement and Interview Questions
Last Updated :
16 Jun, 2024
Microsoft recently visited our campus IIT ROORKEE. The selection process was as mentioned below.
First round was an online coding round consisting of three questions conducted on CoCubes website(Test portal) .
Q1) Very basic question -: Given two integers n and m return n+m if the number of digits in n+m is equal to the number of digits in n otherwise return n. n and m can be positive and negative as well. 2 MARKS
Q2) Basic dp question -: Given a string of length n find out the number of possible strings having no consecutive ones in the string. 3 MARKS
Q3) A linked list normal level question -: Given a linked list L1 - > L2 -> L3 -> ..... Ln-1 -> Ln return the string in the following format L1 -> Ln -> L2 -> Ln-1 -> L3 -> Ln-2 -> ....
5 MARKS
Though not officially declared but the cutoff was 7/10 marks. Students were shortlisted for second round .
Second Round was a group fly round . Details are mentioned below
Q1 ) Given a 8 bit integer swap its two consecutive bits (d0 with d1, d2 with d3 .. and so on ) and then return it. For example 00010101 (23) should return 00101010 (42) . Q2 ) Merge two sorted linked list . The duplicates in two linked list should be present only once in the final linked list . Q3 ) There exists a linear path from 1 -> n cities for example 1->2->3->4-> ... ->n Each path connecting two cities has a cost associated with it. You need to answer queries regarding the cost of moving from (xi -> xj) city. The space complexity can be O(n) but queries must be answered in O(1) time complexity according to the question. Q4 ) Some output question on C++ based like char *ptr = "ABCDEF" char str[] = "ABCDEF" cout<<sizeof(str); cout<<strlen(str); cout<<sizeof(ptr); cout<<strlen(ptr); Q5 ) Reverse the words in the given sentence . "Sky is blue" should return "blue is Sky" Q6 ) Given two rectangles and their bottom right, bottom left, top left and top right coordinates (x, y) find the coordinates of the rectangle formed by the intersection of the two rectangles. The problem with group fly round is that you have to write the code on sheet of paper so you should be very careful while writing the code as a human would be reading it . Proper indentation, comments (if you have time) should be written along with the code. Mention a bit about your approach to give the checker a hint and make it easy for him to evaluate. Shortlisted students were called for interview.
There were two technical interviews.
First technical interview
The interviewer was really friendly and in the first interview he asked to introduce myself and tell me about your recent project mentioned on the resume. The exact question was Briefly describe your recent project and what were the difficulties that you faced during the implementation of the same. Then he asked me the famous count and say problem. Given a string "aabbbccd" return the string "a2b3c2d1" as result. Second question was to implement the Linux tail command which prints the last n lines of the file as output where n is a integer parameter. File handling question. The interviewer asked me to write the code on paper so again do practice to write code on paper as sometimes people cut a lot of times and mess up in the interview. Think properly about the implementation during the provided time and don't rush to write the code instantly. First interview ends.
Second interview
Question 1 ) First question was to come up with a code that provides 3 suggestions to you as you type in the phone . In this interview you are not expected to write the entire code but you have to provide the interviewer with the approach for the question. The question was as I type "bananaa" the code should suggest me with banana. The spelling mistake can occur in between the word, in the end, in the beginning. Provide me with three strings from the dictionary having maximum match with the mis-spelt word. In case of word exists in the dictionary don't suggest anything. Question 2 ) Given an array of integers maximize num1 + num2 - distance. distance between '5' and '10' in the array 5 4 89 25 10 is (4). Second Interview ends and the interview ends. Prepare 2-3 questions to ask the interview about the company and ask them when he says "Do you have any question for me". Stay positive during the interview. Usually The interviewer asks to write the test case where your code can possibly fail. Even if you know your code won't fail, try to generate some interesting test cases; don't stay quite. The interviewer checks your approach and your communication skills and your ability to guide him through your thought process rather than coming up with the correct code in the first attempt. He helps you if you are moving in the wrong direction.
Overall it is a bit luck dependent as well.
Similar Reads
Microsoft's most asked interview questions Like other product-based companies, Microsoft also asks data structures and algorithms as part of their technical interview. Below is a list of questions prepared from different Microsoft interview experiences. Most Asked QuestionsCheck if a Binary Tree is BST or not - Practice hereRemove duplicates
2 min read
Microsoft interview experience | Set 180 (On-Campus) Microsoft IDC visited our campus(IIEST Shibpur) on 24th July, 2018 for on campus hiring. Round 1: Coding Round 1)Find the first non repeating element in the array https://www.geeksforgeeks.org/dsa/given-a-string-find-its-first-non-repeating-character/ 2) Find the next highest palindrome https://www.
4 min read
Morgan Stanley Interview | Set 20 (On-Campus) Morgan Stanley came for Full Time recruitment for Software Associate in our campus. Round 1 Online test on HackerRank contains 19 MCQ (DS, OS, DBMS, and Reasoning etc.)2 Coding Questions 1. Count the number of changes in LED Light when display one digit after another of a given number. (Initially al
3 min read
Microsoft Interview Experience (On- Campus) Round 1: It was an online test with 3 coding problems. All the problems that Microsoft asks are available as far as I know. It was an easy matrix problem.Dice Throw Problem (DP) The Longest contiguous sum subarray problem(DP) Those who did all three problems were selected for the next round. I was o
1 min read
Placements (On-Campus, Off-Campus and Pool Campus) First of all, you can't compare Campus Placements with off-campus placements. Both of them all good in there in own ways. Let's discuss both of them one by one. ON CAMPUS PLACEMENTS Let's start discussing ON campus placements first, If you are a college student you must be aware of campus placements
4 min read
Microsoft Interview Experience for SDE (On-Campus) Hello, I recent graduate from the National Institute of Technology Patna As a Computer Science Engineering student at NIT Patna, I had always dreamt of working for a top tech company like Microsoft. When I found out that Microsoft was coming to our campus for placements, I was thrilled and nervous a
3 min read