Microsoft Interview Experience | SDE-II

Round 1(DSA, Design, Java)
1. Write a code to find kth largest element in an array.
Interviewer was interested in the most optimal solution straight away along with writing code for all the heap operations from scratch.https://www.geeksforgeeks.org/k-largestor-smallest-elements-in-an-array/

2. Write a code to merge k sorted arrays of size n.
Used the heap approach again and coded.
https://www.geeksforgeeks.org/merge-k-sorted-arrays/

3. Design a parking lot. He had given a ParkingLot class. He asked me to design the object oriented architecture supporting the park() and unpark() apis.
Then, he discussed the working of all other support apis of different classes along with the minimum argument list for calling. The internal algorithms also were optimised at the end.
For your reference, you can take help from the below link:
https://www.educative.io/collection/page/5668639101419520/5692201761767424/5770234338213888
4. Under which conditions you will use abstract class and when you will use interfaces.

5. Any design challenge you faced in your project.

Round 2 (Design)
1. Design Distributed cache system.
For data coming from the client side, I used the concept of aggregator in between so as to periodically dump that data to the cache side. But data should be sorted while dumping.
So some challenge got introduced that he asked to sort large GB files with 200 mb main memory. Used n way external merge sort. After agreeing to some extent on my approach, he then asked me to write the full code covering all edge cases for the same.
Also, I used the concept of load balancers just before the cache layer. So, the interviewer asked how you actually implement load balancing. I used the concept of consistent hashing to explain the load balancing part which minimises the redistribution of load when a server gets added/removed and also helps in reducing skewed load on any of the cache by using a concept of virtual servers.
Reference video: https://www.youtube.com/watch?v=zaRkONvyGr8




Round 3(Design)

1. Design Autocomplete feature of Bing search.
All the discussion on how efficiently trie data structure usage will you do and how will you rank the suggestions and how many suggestions will be output to the user.
How will you shard the trie database and design other supporting system components.
My implementation at the end was something like the link given below:
https://www.youtube.com/watch?v=us0qySiUsGU

2. Implement a concurrent mark and sweep garbage collector. I used concept of concurrent hashmap on garbage collector and devised Mark and sweep algorithm accordingly. Then there was discussion on all the concurrency challenges. As I was from Java Background, he asked me this question.

Round 4: (With Director – Office 365 Web apps Team)

The head was part of Microsoft from last 25 years.
1. Discussion on projects and the project architecture. He asked about what part of my framework I am handling.
Since he was very senior, I started to introduce my current and previous projects from the business perspective first and then moved into the architecture part in detail.
He then stressed on the features I developed in my current project to understand the exact business use cases of the same.
2. My challenges faced on a regular basis and how you resolve them to ensure timely delivery of your product.
3. Then he explained all the challenges and the model of the Web apps they are targeting for their Office 365 product. There is a huge delta from the current scenario of Office 365 as far as deploying on the web as SaaS is concerned.

Rounds were done. The director said HR will contact me. Finally, got the offer in some days 🙂

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



My Personal Notes arrow_drop_up

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 Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.