Microsoft Interview Experience | Set 133 (On-Campus for Internship)

Online coding Round
410 students appeared for the online coding round and cgpa cut off was 7. Three coding questions were asked to us and we were given 90 minutes to solve three questions.
1. We were given an array. Values of the array were memory sizes and the memory that is required by the system can only be represented in powers of 2. We had to return the size of the memory required by the system.
Ex: – arr = {2,1,4,5}
Total = 12
So, memory required =16

2. Two strings are given and we had to modify 1 st string such that all the common characters of the 2 strings had to be removed and the uncommon characters of the second string had to be concatenated with uncommon characters of the first string.
Ex: – string 1- aacdb and string 2 – gafd
output – cbgf.

3. We were given a linked list and we had to segregate its even and odd position nodes in such a way that odd position nodes before even positioned nodes and even positioned nodes had to be appended after odd positioned nodes but in a reverse order.
Ex – linked list: – 1 -> 2 -> 3 -> 4 -> 5 -> 6
Output: – 1 -> 3-> 5 -> 6 -> 4-> 2.

12 students were selected for further rounds of interview.

Group Fly round
We were asked only one question in our group fly round.
N rectangles in 2-D space were given to us and we were given (x, y) coordinates of the bottom left corner of each rectangle and height and width of each rectangle. We had to return (x, y) coordinates of the bottom left corner of overlapping rectangle and also give its height and width.

3 students were selected for next round of interviews out of 12.

Technical Interview (Round 1)
1.Started with a brief discussion about my projects. Then he asked which data structure I had studied in my course and whether I am familiar with hashing techniques.
I answered linked list and trees and said that I am comfortable with hashing and then he asked a question on hashing.

2. N flight tickets are given and we had to create the route using these pairs of points from source to the destination. He discussed the approach with me and then asked me to code it.
I started with a hashing based technique and created of hash map First, I found the origin and starting from the origin I reached the subsequent node till I reached the destination by searching in the hash map and stopping when no entry was found in the hashmap and then the final destination was reached.

3. N elements are given to me and n was very large. I had to print the smallest element.
I first gave him a O(n) approach by linear traversal of the array and then he asked whether I could use heap and then I gave him a min-heap based approach.
He was quite satisfied with my approach.


Technical Interview (Round 2)

1.Given a rectangle of size AxB we had to find minimum number of squares that could be formed from that particular rectangle.
I followed a greedy approach first but it failed in few test cases and then I shifted to the recursive based solution and it had overlapping subproblem. So, I decided to use a dynamic programming strategy and then he asked to write pseudo code of my approach.https://www.geeksforgeeks.org/paper-cut-minimum-number-squares/

2. Implement queue (class) and implement Enqueue and Dequeue functions in the class.
I implemented it using a linked list and then he asked me to make class thread safe. It was basically an operating system question and he wanted to test my operating system knowledge.
Then he asked if this queue is used by N machines and each machine has its own view of the queue, how will you maintain the consistency.

HR Round

1.He asked me about my favorite subject. Then he asked difference between virtual addressing and translation lookaside buffer(TLB).
Then he asked as a developer how would you make your programs knowing the fact that the system implements paging.

2.How was your Interview experience till now? Was it according to your expectation and preparation?

3.Do you have any questions? I asked how should I prepare before joining the company? Then he recommended me to work on some open source projects.

The interview experience was quite good. Geeks for geeks was a lot of help to me as it helped me in my placement preparation and provided almost all content that was necessary for placement preparation.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.


Write your Interview Experience or mail it to contribute@geeksforgeeks.org



My Personal Notes arrow_drop_up


Article Tags :
Practice Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.