Hi, a brief documentation of my Microsoft experience is as follows:
On the evening before the interview we had a group activity round. We were given to solve one question on our own, and the other one we had to solve discussing with Microsoft mentor allotted to you.
- Insert an element in a sorted circular singly linked list. Pointer to any node of the LL will be given as input
- A matrix m*n is given. If a cell contains 0 (zero) make that row and column zero.
We had to discuss Q2 with Microsoft mentors. Discussion is important and they point out flaws and ask you to optimize algo.
Interview Round 1:
- Asked me to solve Q2 of group activity without using extra space.
- Given an array of digits, form two numbers from those digits such that sum of those two numbers are minimum
- Given an array of numbers, find out the minimum distance and print all the pairs with minimum distance
Interview Round 2:
- Two string S1 and S2 are given, check whether S1 is a shifted version of S2
- Write KMP/ Rabin-Karp for substring matching
- Given a pointer to a circular linked list, delete that node
Interview Round 3:
- Given a set of rectangles of varying length and breadth, find out the maximum height stack you can form with them such that if rectangle R1 is on top of rectangle R2 then length(R1)<=length(R2) and breadth (R1)<=breadth(R2)
- Given the number of braces(opening +closing), find out the number of valid combinations you can form with them.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.