Round 1: Machine Coding
Design a snake and ladder game. Code should be modular and demoable. Time given was 90 minutes. He mentioned the code should handle cases when you want to add a new obstacle along with snake and ladder, add any number of players in the game etc.
Round 2: PS/DS round
I liked the interview questions. They were of medium difficulty. 4 questions were asked. I don’t remember all the questions.
- Question asked was similar to this – https://www.geeksforgeeks.org/dynamic-programming-building-bridges/.
- There are seats numbered from 1 to N placed in a row. You are given a list of integers empty spaces and a list of occupied spaces both between 1 to N. You are given M queries. In each query, you need to allocate a seat to a new person such that the distance between him and closest person to him is maximized. 1<=N<=10^7, 1<=M<=10^7, M<N . I solved it using priority queue.
- Given an array of integers. You need to find three indexes i, j, k such that the product A[i]*A[j]*A[k] is maximum and A[i]<=A[j]<=A[k] and i<j<k.
Round 3: Design Round
Design a parking lot with all the classes and class diagram. I was asked to design everything on a whiteboard. Then he asked me how would you write an algorithm if you need to guide a car to its parking spot. He discussed the approach and was convinced with my solution. Also, the discussion moved on to how google implements google map.
Round 4 : Hiring Manager Round
- HM seemed very knowledgeable. For about 45 minutes we had in-depth discussion on my current work and project.
- He then asked me to if I had to design a tiny url service, how many days will I need to come up with a production level code.
- Why phonepe ?
- Some behavioral questions.
- Then I asked him a couple of questions about Phonepe.
HM round was the longest round with went for about 2.5 hrs. I was asked to leave for the day.
I got an offer after 2 days:)
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course. In case you are prepared, test your skills using TCS, Wipro, Amazon and Microsoft Test Serieses.