Google SWE III ML - L4 interview experience - May - 2025

google logo
google
SWE III ML - L44 years
May 14, 20255 reads

Summary

I interviewed for a SWE III ML - L4 role at Google in May 2025 and had a positive experience, moving to team match after completing a Phone Screen and several Onsite rounds covering Data Structures & Algorithms, System Design, and Behavioral questions.

Full Experience

Background -

LC: 850+
YOE: 4+
Edu: MTech (IIT)

TPS -

given the values of the sides of the two dice,
across all possible ways for the dice to fall, in how many ways does A win?
A dice wins when its number is greater than the other dice number.

For example, say the dice are 3-sided, with the values:
A = [2, 2, 4],
B = [1, 2, 3].

The number of ways for A to win is 5
{A: 2, B: 1},
{A: 2, B: 1},
{A: 4, B: 1},
{A: 4, B: 2},
{A: 4, B: 3}.

Follow-up -
Assume: Dice arrays are both given as sorted.

Self Feedback -
Was able to solve it the original ques. in O(n log n) and follow-up optimally in O(n) time.

Interviewer feedback -
Positive. Moved to onsites.

Onsite R1 -

Given a piano where you can only use one hand to play. You will place your hand on the piano and can play the five keys. In order to play a key which is not in range you will have to raise your hand. Find the minimum number of hand raises to play all the keys in given order.

Follow up:
return the list of thumb positions you actually use—so you can see exactly where your thumb goes for each segment

Self & Interviewer Feedback -
Solved the initial problem with (2 approaches) optimal time & space complexity but could complete the follow-up coding. Although was in the right direction.
Interviewer was satisfied but told he wanted to get more out of me. Did communicated well with dry runs but unfortunately couldn't complete coding.

Onsite R2 -

On my disk, I have a file system. The file system contains files which have a known size and directories that either contain files or directories. And I want to know, given any point in this file system, what's the total space it's consuming as I got a bit confused due to time running out.
Ex -

/*
root (id=1)
dir (id=2)
file1 (id=4): 100B
file2 (id=5): 200B
file3 (id=3): 300B
*/

Map<Integer,Entity> fileSystem = initialiseFileSystem();

Follow-up 1 : what happens when we need to add files?
Follow-up 2 : service is timing out on boot.

Self & Interviewer Feedback -
Was able to code optimally for the initial question and the first follow-up 1. There was no time left for Follow-up 2 but explained the approach verbally. Interviewer seem satisfied. Followed OOD for coding. Communicated well with dry runs.

Onsite R3 -

Q1. write an algorithm to find the top K most frequent words in a document. And I have to assume that the document is already parsed. So, I can read the document as an array of strings. For example, there is a set of words in the document array. So, Google, Bike, Pencil, Google, Bike, Google. So, the top two frequent words are Google and Bike.

Follow-up 1: What would you do if your document, not the words document, was not an array of strings, but it was actually a stream?

Follow-up 2: what happens now if your integer k is 0?

Q2. write an algorithm to perform a prefix search. For example, given that we have the words Google, Good, Grape in our dictionary, and a search for Goo, it should return Google and Good, but not Grape.

Follow-up 1: what happens when your prefix is an empty string?

Self & Interviewer feedback:
Solved both coding with optimal approach and answered all follow-ups via code / verbally as directed by the interviewer. Interviewer seemed satisfied as I was able to complete everything before time. He asked or pointed about few special and edge case scenarios which I answered or modified in my code as per discussion.

Onsite R4 - Googliness

1. Tell me about yourself.
2. Conflict resolution with peer.
3. Can you think of a time where your behavior positively impacted your team?
4. Tell me a time where you go above and
beyond your responsibility to ensure the product that you work on serves the user well.

Self & Interviewer feedback:
Answers were descriptive and interviewed seem impressed.

Overall feedback is positive. Moved to team match.

Interview Questions (9)

Q1
Dice Game Win Count
Data Structures & AlgorithmsMedium

Given the values of the sides of the two dice, across all possible ways for the dice to fall, in how many ways does A win? A dice wins when its number is greater than the other dice number. For example, say the dice are 3-sided, with the values: A = [2, 2, 4], B = [1, 2, 3]. The number of ways for A to win is 5 {A: 2, B: 1}, {A: 2, B: 1}, {A: 4, B: 1}, {A: 4, B: 2}, {A: 4, B: 3}. Follow-up: Assume: Dice arrays are both given as sorted.

Q2
Minimum Hand Raises on Piano
Data Structures & AlgorithmsMedium

Given a piano where you can only use one hand to play. You will place your hand on the piano and can play the five keys. In order to play a key which is not in range you will have to raise your hand. Find the minimum number of hand raises to play all the keys in given order. Follow up: return the list of thumb positions you actually use—so you can see exactly where your thumb goes for each segment.

Q3
File System Total Space Consumption
System DesignMedium

On my disk, I have a file system. The file system contains files which have a known size and directories that either contain files or directories. And I want to know, given any point in this file system, what's the total space it's consuming as I got a bit confused due to time running out. Ex - /* root (id=1) dir (id=2) file1 (id=4): 100B file2 (id=5): 200B file3 (id=3): 300B */ Map<Integer,Entity> fileSystem = initialiseFileSystem(); Follow-up 1: what happens when we need to add files? Follow-up 2: service is timing out on boot.

Q4
Top K Most Frequent Words
Data Structures & AlgorithmsMedium

Write an algorithm to find the top K most frequent words in a document. Assume the document is already parsed, so it can be read as an array of strings. For example, if the document array is ["Google", "Bike", "Pencil", "Google", "Bike", "Google"], the top two frequent words are Google and Bike. Follow-up 1: What would you do if your document was not an array of strings, but actually a stream? Follow-up 2: What happens now if your integer k is 0?

Q5
Prefix Search in Dictionary
Data Structures & AlgorithmsMedium

Write an algorithm to perform a prefix search. For example, given that we have the words Google, Good, Grape in our dictionary, and a search for Goo, it should return Google and Good, but not Grape. Follow-up 1: What happens when your prefix is an empty string?

Q6
Tell Me About Yourself
Behavioral

Tell me about yourself.

Q7
Conflict Resolution with Peer
Behavioral

Conflict resolution with peer.

Q8
Positive Impact on Team
Behavioral

Can you think of a time where your behavior positively impacted your team?

Q9
Going Above and Beyond for User
Behavioral

Tell me a time where you go above and beyond your responsibility to ensure the product that you work on serves the user well.

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!