Microsoft visited our campus for hiring FTE’s and Interns. I had opted for both Microsoft IT and IDC. The first couple of rounds were online rounds and were hosted on Cocubes.com
Round 1
It comprised of 15 MCQ Questions and time allotted was 30 mins. Every student had a unique set of questions which comprised of C,C++ (I/O), Data Structures, Java, and Aptitude. The questions required a decent amount of thinking.
Round 2 (Online Coding)
1. You are given a matrix of dimensions m*n where each cell in the matrix can have values 0,1 or 2 which has the following meaning :
0:empty cell
1:cells have fresh oranges
2:cells have rotten oranges
So we have to determine what is the minimum time required so that all the oranges will be rotten. A rotten orange at index [i,j] can rot other fresh orange at indexes [i+1,j] ,[i,j+1] ,[i-1,j] ,[i,j-1]. If it is impossible to rot every orange then simply return -1.
This was to be done without allocating any extra space.
2. Connect all leaf nodes of a binary tree to make a LL. (Without allocating any extra space for the linked list).
Now, around 30 students were shortlisted for Microsoft IT and around 40 for IDC. There were some people who got short listed for both. I was lucky enough to sit for both of them.
From here I will write the processes for IDC and IT separately.
FOR IT
Round 3(Group Fly Round)
Some people who had a high score in the 1st and 2nd rounds did not have to appear this round. They were promoted for the next rounds.
There were two questions.
- Given a string (Assume that its case insensitive and has no spaces), find the length of the largest palindromic substring. While the brute force solution would have O(n^2) complexity, with some thinking you can arrive at a O(n^2) solution.
- Given a string , return the length of the longest substring which comprises of consecutive characters. Ex: abcxy Output: 3 abc