Google | L4 | Hyderabad | DS/MLE Interviews Experience

google logo
google
MLE L4Hyderabad4.5 years
May 23, 20252 reads

Summary

I interviewed for an MLE L4 position at Google in Hyderabad, consisting of 5 rounds including Phone Screen, two DSA rounds, Googlyness & Leadership, and an ML Domain round. The interviews were coding-heavy, and despite not expecting a positive outcome, I performed better than my own expectations, gaining valuable insights for future preparation.

Full Experience

YOE - 4.5 years as a Data Scientist.

Google recruiter reached out via LinkedIn for MLE profile, L4. Gave the interviews mostly for experience, was not actively looking for a switch.

The leetcode community helped me in preparing, so sharing these details so that I could be of help to someone as well. :)

Total 5 interview rounds (including Phone screen)

Phone Screen Round (DSA) Question. Given a list of strings like ['abc', 'bca', 'cab', 'xyz'], output the list of list of strings such that each group contains all the strings that can be rotated and converted to the other strings. For example ['abc', 'bca', 'cab'] will be part of one group.

Implemented an almost brute force technique for this, used dictionary to store each new string as key, and value would be the list of all strings that have the same rotations. Evaluation focus was to have working implementation, explaining the time complexity and handling edge cases.

Result - Cleared this round with the feedback that I need to focus more on the edge cases next time onwards. Expected Feedback - Hire

DSA 1 - Given a storage where you can create sub parts to the storage, give the best order to delete the parts such that all the storages are deleted. A storage can be deleted if it has no children. Example {A : B, C} {B : C} {C} {D}

Output - [D, C, B, A] or [C, D, B, A] Implemented DFS based topological sort, nailed the implementation, interviewer was pretty impressed, and gave a follow up on this. If you there are two options to delete, delete those together.

Asked for implementation of this as well. Thought about it and figured out that implementing topological sort using BFS while maintaining 0 indegree nodes together should work, implemented the follow-up as well (not fully tested though), but got a very good feedback for this. Expected Feedback - Strong Hire

DSA 2 - Given key value pairs of countries and countries you can teleport to. You need to reach from source to destination with the minimum cost using the teleporters. You are also given a set of broken teleporters so if you encounter these, you take 1 day to first fix the teleporter, and then teleport. Example - Connections: {0 : 1, 2, 3} {1 : 2, 5} {2 : 3, 4, 5} {3 : 4, 6} {5 : 6}

broken = {5} source = 1 destination = 6 Expected output = 0, because you can choose the path 1 -> 2 -> 3 -> 6 with cost 0.

Created adjacency list with cost 0, and 1 (reaching anywhere from a broken teleporter), then tried to implement using bfs first, but realised I might need backtracking as well. Switched to implementing Dijkstra algorithm, even though I was getting distances to every node, instead of just the destination. Returned the cost to the destination node. Interviewer was pretty impressed looking at the correctness of the implementation, so asked me to add comments, explain time complexity, space complexity and seemed happy with the responses. Expected Feedback - Strong Hire

Googlyness and Leadership Round Was asked questions of the format

  • Give me an instance where you gave someone a harsh feedback but it helped in their growth.
  • An example where you went out of your way in your workplace.
  • What are you planning to learn in the next one year?

Strong communication skills and storytelling should definitely help here. It is alright if something never happened and you make up a story, but you should be able to deliver it as if it happened.

The interviewer gave away a bit of feedback by saying this - "Do say hi if you plan to join google after these interviews" Expected Feedback - Strong Hire

ML Domain Round The interviewer made up a system design question on the fly based on the work that I have done before. Given an email, a query, and user profile. Retrieve the relevant emails based on the query. The results should be ranked. Follow-up : Personalise the results based on user profile as well.

The discussions went well about the design and what are the possible approaches, dual embedder model using transformers, creating embeddings for email, as well as query. Cosine Similarity for getting the ranking. However, things went very wayvard once he asked me to code parts of the design. I went blank and didn't recall the details of how to create tensors, writing optimizers and all. Guess the interviewer got a fair bit of idea that usually ChatGPT is used for the coding part, and I'm only aware of the design side of things. :( The follow-up questions didn't go too well as well, since I got anxious because I messed up the coding. Still shared enough views on designing the follow-up problem.

Interview Questions (7)

Q1
Group Rotated Strings
Data Structures & Algorithms

Given a list of strings like ['abc', 'bca', 'cab', 'xyz'], output the list of list of strings such that each group contains all the strings that can be rotated and converted to the other strings. For example ['abc', 'bca', 'cab'] will be part of one group.

Q2
Topological Sort for Storage Deletion
Data Structures & Algorithms

Given a storage where you can create sub parts to the storage, give the best order to delete the parts such that all the storages are deleted. A storage can be deleted if it has no children. Example: {A : B, C}, {B : C}, {C}, {D}. Output - [D, C, B, A] or [C, D, B, A]. Follow-up: If you there are two options to delete, delete those together.

Q3
Minimum Cost Teleporter Path with Repairs
Data Structures & Algorithms

Given key value pairs of countries and countries you can teleport to. You need to reach from source to destination with the minimum cost using the teleporters. You are also given a set of broken teleporters so if you encounter these, you take 1 day to first fix the teleporter, and then teleport. Example - Connections: {0 : 1, 2, 3}, {1 : 2, 5}, {2 : 3, 4, 5}, {3 : 4, 6}, {5 : 6}. broken = {5}, source = 1, destination = 6. Expected output = 0, because you can choose the path 1 -> 2 -> 3 -> 6 with cost 0.

Q4
Giving Harsh Feedback
Behavioral

Give me an instance where you gave someone a harsh feedback but it helped in their growth.

Q5
Going Out of Your Way
Behavioral

An example where you went out of your way in your workplace.

Q6
Future Learning Plans
Behavioral

What are you planning to learn in the next one year?

Q7
Email Retrieval and Ranking System Design
System Design

Given an email, a query, and user profile. Retrieve the relevant emails based on the query. The results should be ranked. Follow-up: Personalise the results based on user profile as well.

Preparation Tips

I did 1 month of rigorous DSA prep, solving around 250 questions, medium and hard. For the ML round, I only went through theory and a bit of system design, which I believe turned out to be an issue in the end.

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!