Google India L4 MLE Interview experience
Summary
I recently interviewed for an L4 MLE role at Google India. Despite clearing the phone screen and one DSA onsite round, I received negative feedback on the second DSA and ML rounds, ultimately not securing the position.
Full Experience
Hi All,
I want to share my experience from my recently concluded Google interviews for MLE role to give back to the community which has helped me prepare for my Google dream.
Interview Process:
- Phone Screen (DSA) - this round is elimination round.
- 2 DSA rounds
- 1 ML round
- 1 Googlyness
Timeline: Recruiter reached out through linkedin around early April -> Phone screen one month later -> Onsites one month later. All onsites done within a week.
Questions: 1. Phone screen: https://leetcode.com/discuss/post/6626514/google-l3-tpsmarch-by-bhima2001-x7jv/
Exact same question with same follow up. Solved the first question quickly within 25 mins, discussed the approach for the follow up in the next 10 mins. Interviewer did not want me to code it up. Interview was over in 35 mins, last 10 mins I had a good discussion with the interviewer on their work. Result: Positive, moving to onsites.
2. Onsites R1 (DSA): It was a relatively easier question. You are given a list of sentences. Design an API which takes one word as an input and predicts the next word based on the sentences provided. E.g. Sentences = [["I","AM","SAM"], ["SAM","LIKES","ICECREAM"], ["I","AM","TALL"], ["I","WANT","COOKIE"]] For the first part, the predicted word should be the most frequent word that appears next to the input word in the sentences. For e.g: Input: "I", Output: "AM"
Follow up: Randomly pick the next word based on the probability. Probability is calculated as: Frequency of a word/Total count of words.
E.g: For the input "I", there are 2 next words in the example - "AM" and "WANT". Probability of "AM" : 2/3 and probability of "WANT": 1/3
This is very similar to this question on leetcode - https://leetcode.com/problems/random-pick-with-weight/description/
I solved the first part optimally using hashmap, tracking the most frequent next word for each word. Solved the follow up quickly as well and covered the edge cases (there were many).
Result: Positive
3. Onsites R2 (DSA): Word to word - https://codeforces.com/problemset/problem/448/C
This was a tough round. The interviewer just pasted the question and did not want me to discuss anything but just solve it in 35 mins. I still kept him engaged because I had seen this question a while back and I knew it was a tricky one. Keeping him engaged really helped as I corrected my approach through his verbal and non-verbal feedback. I quickly came up with the Divide and Conquer approach and the interviewer was quite impressed by that and asked me to code it up. However while coding, I realised there are a lot of things to consider. I juggled with the right approach and landed very close to the optimal (O(N2)) solution by the end of the interview, but there were a few more optimizations that were required.
Resut: Negative. Not sure if the interviewer expected the linear complexity solution for this which uses segment trees. My O(N2) solution was pretty close to optimal but still got negative rating
4. Onsites R3 (ML): This was again a very surprising round for me. I had spent a lot of time preparing for ML system design rounds but this was on completely different lines. I had specifically asked my recruiter to arrange a call with a Google MLE to get an understanding before this round but none of his advise resembled the problem I was given. I am choosing to not reveal the problem as I believe it could easily reveal my identity because I don't think many people are asked this type of question for ML rounds. Also there's no benefit in preparing for this type of problem because chances of getting asked such questions are very very low. Generally it's a system design round for ML such as content moderation, video recommendation etc. but this was a problem which is an active area of research. The solution required a combination of Topo sort + ML.
Result: Negative. I identified topo sort solution pretty quickly and did fairly well on the follow up, but it seems that the interviewer was expecting me to come up with the exact solution to this problem.
Got a call few days later that I did not make it. Googlyness did not get scheduled. I asked for another DSA round to make up for the 2nd DSA round but the recruiter said it's not possible given the ML round rating is also not very positive.
While the result this time did not turn out in my favor, I have my head held high for making it this far into the very rigorous Google interview process. From not giving myself more than 5% odds of success when I started to actually feeling like I have a shot at qualifying by the end has been one hell of an experience. It sucks to get this close to such an amazing opportunity but missing just enough to go back to where you started. I guess life is going to suck for a few days and then we move on to better things.
Interview Questions (1)
You are given a list of sentences. Design an API which takes one word as an input and predicts the next word based on the sentences provided. E.g. Sentences = [["I","AM","SAM"], ["SAM","LIKES","ICECREAM"], ["I","AM","TALL"], ["I","WANT","COOKIE"]] For the first part, the predicted word should be the most frequent word that appears next to the input word in the sentences. For e.g: Input: "I", Output: "AM"
Follow up: Randomly pick the next word based on the probability. Probability is calculated as: Frequency of a word/Total count of words.
E.g: For the input "I", there are 2 next words in the example - "AM" and "WANT". Probability of "AM" : 2/3 and probability of "WANT": 1/3
Preparation Tips
I want to reflect on the roller coaster journey that started since I got the call in early April. With 5 years of experience in Data Science and having developed many models across different domains, this opportunity was perfect for me to take the next leap in my career. But the problem was that I had never touched DSA in my life before this. Hence began the leetcode grind which lasted almost 2.5 months. I started with the interview focused crash course on leetcode and by the time of phone screen, I had solved around 280 problems. By the time of onsites, I had done about 380 problems with a good ratio of Hard/Mediums. To my surprise, I actually got pretty good at it by the time of onsites and could easily detect patterns in most problems. Any problem above 50-55% acceptance on leetcode became quity easy to solve. For the ML part, I had pretty good understanding of classical ML algorithms. For Deep learning, I used the classic "Hands on machine learning" book which also covers tensorflow coding. For system design, I read many blogs and articles along with this course - https://bytebytego.com/courses/machine-learning-system-design-interview/visual-search-system. I also did 4 mock interviews for DSA and 1 mock for ML round.