Company: Microsoft Position: Senior Software Engineer Azure
Applied directly on the careers website. A recruiter called and scheduled the first round.
Round 1: DSA This round was with a principal engineer. The interviewer was a network engineer, not a software engineer. Question 1 You are given n cities; find the shortest path from the source city to the destination city. I mentioned Dijkstra's algorithm could find the shortest path.
Interviewer - How will you handle loops?
Me- I'm using a min heap to traverse nodes. I'm maintaining minDistance in a map. If we encounter that node again, we'll only process it if the new distance is less than the distance we've seen before.
I wrote the entire code and explained the code block where an infinite loop would be avoided. However, the interviewer did not know Dijkstra's implementation at all. It took 30 minutes to explain it to him by drawing how Dijkstra's algorithm works and how it avoids infinite loops.
He kept asking if it was BFS or DFS.
In my code, I used priorityQueue.offer().
Interviewer - What is this offer API?
Me- It's a built-in Java method to add to a min heap.
Interviewer - What is this offer? Why did you use it?
Me- To maintain a min-heap of distances seen.
.
.
.(5 minutes later)
Interviewer - 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 explained the self-balancing tree.
Question 2 You have a movie booking system. You want to query efficiently:
I said for my database table, I would use a secondary index to store data indexed by userId.
Him - No database, what if you had this data in memory? Me - If we're storing this data in memory using a hashmap, and the key of the map is userId, the second query would be inefficient. To mitigate this, I would store the data duplicated in another map whose key is movieId. So both queries could be really fast.
Him - No, we don't want to increase space. We want to store it efficiently without any extra space. I was thinking about how to be efficient in space and time. I couldn't answer, and time was up.
Two 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.
I had a really good discussion, and in the last 15 minutes, we talked about one of my projects. It was a pleasant experience.
HR called the next day and scheduled Round 3.
Round 3: HM round This was also a bad experience with a rude hiring manager. He was 10 minutes late for the interview.
Question - Describe a project where you faced a technical challenge. I described a project where I solved a race condition in a distributed system by using a cache. I explained it to him using whiteboard diagrams of the entire architecture. Since we were short on time, I just wrote basic names of components like cron, service, database to explain it in an abstracted manner.
Him - What is this service you have written? Your service didn't have a name or what. Me - Sorry, I will mention the name properly.
After describing the project, he said, "I don't find this project challenging; have you ever worked on a more challenging project?"
I described another challenging project where I scaled the service to handle a huge load and how I was able to reduce infrastructure costs by 50%.
As I was describing components, I mentioned I used AWS S3 and AWS EC2. He didn't even know what S3 and EC2 were. A hiring manager at Azure didn't know some of the more famous cloud components.
At the end of the interview, I asked him what his expectations were. He said - I would expect you to work on high-scale systems. The scale you work at is no match for what we do. We work at PLANET SCALE.
After that, I haven't gotten any response from HR. I emailed multiple times for an update, but there was no reply. It was a really bad experience.