Company: Microsoft
Position: Senior Software Engineer Azure
Applied Directly on the careers website. Recruiter called and scheduled the first round
Round 1: DSA
This round was with principle engineer. But he was not a software engineer but a network enginner.
Question 1
You are given n cities, find shortest path from source city to destination city.
I mentioned we can use djikstra's algorithm to find shortest path.
Interviewer - How will you handle loop.
Me- I am using a min heap to traverse node. I am maintaining minDistance in a map. IF we encounter that node again, we will process only if the new dist is less than the distance we have seen before.
I wrote the whole code and explained code block where infinite loop would be avoided.
But he dint know Djikstra's implementation at all. I took 30mins to explain to him by drawing how djikstra's work and how it will not loop infinitely.
He kept asking me but is this BFS or DFS.
In my code i had used priorityQueue.offer().
Interviewer - What is this offer API
Me- Its inbuilt java method to add to min heap.
Intervier - What is this offer. Why did you use it?
Me- To maintain minheap of distance seen.
.
.
.(5 mins later)
Intervier - But what is this offer method
Me - Realized Oh do you mean what happens when i do heap.add()?
Him - Yes yes that's what i mean.
Then i went to explain self balancing tree.
Question 2
You have a system of movie booking system.
You want to query efficiently
- Find all movie bookings for a user
- Find all users who have booked this move.
I said for my database table i will use a secondary index to store indexed by userId.
Him - No database, what if you had this data in memory
Me - Say we are storing this data in memory and we are using hashmap. If Key of map is userId then 2nd query it would be in efficient. To mitigate this, i would store data duplicated in another map whose key is movieId. So both queries can be really fast.
Him - No, we dont want to increase space. We want to store it efficiently without any extra space.
I was thinking how we would be efficient in space and time. Couldnt answer and time was up.
2 days later HR called and scheduled Round 2.
Round 2: HLD
This was a really good round. The interviewer was nice as well.
Question
Design a distributed cache
Had a really good discussion and last 15 mins we talked on one of the projects that i did. It was really pleasant experience
HR called the next day and scheduled 3rd round
Round 3: HM round
This was also a really bad experience with rude HM.
He was 10mins late for the interview.
Question - Describe a project where you face a techincal challenge
I described a project where i solved a race condition in distributed system by using a cache. Explained to him using whiteboard diagrams the whole architecture.
Since we were short of time i just wrote basic names of component like cron, service, database to explain him in an abstracted manner.
Him - What is this service you have written. Your service dint have name or what.
Me - Sorry i will mention the name properly.
After describing him the project he said. I dont find this project challenging, have you ever worked on more challenging project.
I went to describe another challenging project I scaled the service to handle huge load and how I was able to reduce infra cost by 50%.
As i was describing components, i mentioned i used AWS S3 and AWS EC2.
He dint even know what was S3 and EC2. Hiring manager of Azure dint know one of the more famous cloud components.
At the end of the interview, i asked him, what would be expectation from me.
He said - I would expect you to work on high scale system. Scale you work at is no match for what we do. We work at PLANET SCALE.
After that havent gotten any response from HR. Emailed multiple times for update, but no reply. Really a bad experience.


