Panda Guru LogoPanda
Guru

Microsoft Senior Software Engineer | Pathetic experience | Ghosted

Round 1: DSA

Questions: You are given n cities, find shortest path from source city to destination city.
I mentioned we can use Dijkstra's algorithm to find the shortest path.

Interviewer - How will you handle loop?
Me - I am using a min heap to traverse nodes. I am maintaining minDistance in a map. If we encounter that node again, we will process only if the new distance is less than the distance we have seen before.

Interviewer kept asking me if this is BFS or DFS.
In my code, I had used priorityQueue.offer().
Interviewer - What is this offer API?
Me - It's an inbuilt Java method to add to the min heap.
Interviewer - What is this offer? Why did you use it?
Me - To maintain the min heap of distances seen.

Question 2:
You have a system of movie booking. You want to query efficiently:

  1. Find all movie bookings for a user.
  2. Find all users who have booked this movie.

I said for my database table I will use a secondary index to store indexed by userId.
Interviewer - No database, what if you had this data in memory?
Me - Say we are storing this data in memory and we are using a hashmap. If the key of the map is userId, then for the second query, it would be inefficient. To mitigate this, I would store data duplicated in another map whose key is movieId.

Interviewer - No, we don’t want to increase space. We want to store it efficiently without any extra space.

Candidate's Approach

I explained my approach using Dijkstra's algorithm and how I would handle loops with a min heap. For the movie booking system, I discussed using a hashmap for efficient querying but struggled to address the space efficiency concern raised by the interviewer.

Interviewer's Feedback

No feedback provided.


Round 2: HLD

Questions: Design a distributed cache.

Candidate's Approach

Had a really good discussion about the design and architecture of a distributed cache. We spent the last 15 minutes discussing one of my projects, which was a pleasant experience.

Interviewer's Feedback

No feedback provided.


Round 3: HM Round

Questions: 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, explaining the architecture with whiteboard diagrams.

Interviewer - 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, the interviewer said he didn't find it challenging and asked if I had worked on a more challenging project. I then described another project where I scaled the service to handle huge load and reduced infrastructure costs by 50%.

I mentioned using AWS S3 and AWS EC2, but the hiring manager didn't know what S3 and EC2 were.

At the end of the interview, I asked about expectations. He said he would expect me to work on high-scale systems and that the scale I work at is no match for what they do. They work at PLANET SCALE.

Candidate's Approach

I explained my project involving a race condition and how I used a cache to solve it. I provided an abstract overview of the architecture but was criticized for not naming components properly.

Interviewer's Feedback

The hiring manager expressed that he did not find my project challenging and questioned my experience with high-scale systems, implying that my background was insufficient for their expectations.