Google (India) | L4 | 4YOE | Rejected
Summary
I interviewed at Google India for an L4 role, completing 5 rounds including a phone screen, three technical rounds, and a Googlyness round. Despite feeling that most rounds went well, particularly my solutions for the first and third technical questions, I was ultimately rejected after two weeks. I plan to reattempt after the cooldown period.
Full Experience
A recruiter reached out to me somewhere in December '24 and we talked about moving further to talk about the interview process. But it wasn't until March '25 when we had that "next" call.
I was briefed about the interview process that there will be 5 rounds. 1 Phone Screen (elimination) and 3 technical rounds + 1 Googlyness rounds. The technical and Googlyness rounds had a cumulative feedback.
Note: I asked for a interview time after 7PM IST so all of my interviewers were based in the US timezone.
Round 0 (Phone screen):
I was asked to design an content server and had to implement 2 APIs:
getContent()addContent(contentContent, contentScore)
getContent() should return content and reduce its score by 1. Also, we cannot return back the same content twice.
The statement was pretty vague so I had to do some back and forth to gather the requirement and build upon it, but I was able to do so and the interviewer seemed satisfied.
A week later, I received a callback that I have cleared the Phone screen round and another recruiter will be reaching out to me (this took another 15-20 days).
Round 1 (Technical round 1):
A matrix was given which represented an ocean with cells having values as 0 and 1, 0 indicating that it's water and 1 indicating that it's a land or a part of some island.
If a cell (or a group of cells) having a 0 value was surrounded by a land cell (1) on all sides, then it was considered a fresh water lake.
The input was the coordinates of a land cell and I had to tell the number of fresh water lakes that island had.
For example, consider the following matrix:
0 1 2 3 4 5 6 7 8 9
0 [0 0 0 0 0 1 0 0 0 0]
1 [0 0 1 0 0 0 1 1 1 0]
2 [0 1 0 1 0 0 1 0 0 1]
3 [0 0 1 0 0 0 1 1 1 0]
4 [0 0 0 0 0 0 1 0 1 0]
5 [0 0 0 0 0 0 1 1 1 0]
Let's say the input is given as {1, 2}, then the island has only 1 lake. But if the input is {2, 7} then the island has two lakes i.e. one with the cells {2, 7} + {2, 8} and another with the cell {4, 7}. Note that I asked the interviewer and then got to know that the land cells can be connected in 8 directions (up, up-right, right, right-down, down, down-left, left, left-up) but the water cells are only connected in four directions (up, right, down, left) - that is the reason why cell {1, 9} is not connected to the lake and why cell {0,5} is connected to the island.
I tried building upon a solution initially using brute force and failed but I soon implemented a solution quickly:
- Preprocess the matrix and mark all the ocean cells using multi source BFS or DFS - this will leave out the fresh water lake cells as it is.
- Start a BFS from the given island cell and every time we hit a fresh water cell, start another BFS for that cell to ensure we've covered the complete lake.
- The number of times we run BFS for the fresh water cell is going to be the answer as it will be equal to the number of lakes in that island.
The interviewer said that this is not the most optimal solution but it's acceptable. I am probably a little confused as I do not think there can be a better solution than this - I tried searching for this but couldn't find anything better. Anyway, moving onto next round.
Round 2 (Technical round 2):
I was given a log file sorted by time and every log line contains a marathon runner and a checkpoint they have reached. I had to return the order of checkpoints as they can appear. It was also given that a runner can choose to stop or not stop at a particular checkpoint.
The question was just the above part and I came to a agreement with my interviewer that after some processing I can assume a pair of runner ID and a checkpoint tag for each line. For example:
{1, b}
{2, c}
{1, c}
{2, a}
{1, f}
Using the above information, I deduced that each runner will reach their checkpoints in order anyway. So I concluded:
1 --> {b, c, f}
2 --> {c, a}
After this, I flunked and gave only the brute force solution of finding each checkpoint's position but 2 days after the interview I realised that all that was left for me to do was implement topological sort here to get the final answer as b, c, f, a or b, c, a, f.
Note that if we have contention between two checkpoints or their order is not clear from the given information, we can assume them in any order. See above example for reference with a and f.
Round 3 (Technical round 3):
I was expecting this to be a DSA round but this turned out to be more like a design round.
I had to design a library which can check whether a given function (which only takes in boolean parameter(s)) is a good or bad function. There was a condition given according to which we had to evaluate if it was good or bad.
For completeness, I would mention that the given condition was such that the if the function evaluates to true for either a positive or negative value of the passed parameter, then it is a good function.
We discussed the tradeoffs and my choices why I went for a certain way and implemented feedback whenever the interviewer tried to point out any.
Round 4 (Googlyness):
I think most of the questions I got are mentioned in this post by a fellow Leetcoder: https://leetcode.com/discuss/post/5963463/googlyness-frequently-asked-questions-by-55sh/
Verdict: Rejected
I got the rejection after 2 weeks. And this is the most confusing part for me as according to me most of the things went good apart from the second technical round. I asked my recruiter about the feedback and what got me rejected or which round went wrong but I was only told that "the feedback was not good".
So anyway, I have accepted this and will attempt after the cooldown period again xD
Interview Questions (5)
I was asked to design an content server and had to implement 2 APIs: getContent() and addContent(contentContent, contentScore). getContent() should return content and reduce its score by 1. Also, we cannot return back the same content twice. The statement was pretty vague so I had to do some back and forth to gather the requirement and build upon it, but I was able to do so and the interviewer seemed satisfied.
A matrix was given which represented an ocean with cells having values as 0 and 1, 0 indicating that it's water and 1 indicating that it's a land or a part of some island. If a cell (or a group of cells) having a 0 value was surrounded by a land cell (1) on all sides, then it was considered a fresh water lake. The input was the coordinates of a land cell and I had to tell the number of fresh water lakes that island had. For example, consider the following matrix:
0 1 2 3 4 5 6 7 8 9
0 [0 0 0 0 0 1 0 0 0 0]
1 [0 0 1 0 0 0 1 1 1 0]
2 [0 1 0 1 0 0 1 0 0 1]
3 [0 0 1 0 0 0 1 1 1 0]
4 [0 0 0 0 0 0 1 0 1 0]
5 [0 0 0 0 0 0 1 1 1 0]
Let's say the input is given as {1, 2}, then the island has only 1 lake. But if the input is {2, 7} then the island has two lakes i.e. one with the cells {2, 7} + {2, 8} and another with the cell {4, 7}. Note that I asked the interviewer and then got to know that the land cells can be connected in 8 directions (up, up-right, right, right-down, down, down-left, left, left-up) but the water cells are only connected in four directions (up, right, down, left) - that is the reason why cell {1, 9} is not connected to the lake and why cell {0,5} is connected to the island.
I was given a log file sorted by time and every log line contains a marathon runner and a checkpoint they have reached. I had to return the order of checkpoints as they can appear. It was also given that a runner can choose to stop or not stop at a particular checkpoint. The question was just the above part and I came to a agreement with my interviewer that after some processing I can assume a pair of runner ID and a checkpoint tag for each line. For example:
{1, b}
{2, c}
{1, c}
{2, a}
{1, f}
Using the above information, I deduced that each runner will reach their checkpoints in order anyway. So I concluded:
1 --> {b, c, f}
2 --> {c, a}
Note that if we have contention between two checkpoints or their order is not clear from the given information, we can assume them in any order. See above example for reference with a and f.
I had to design a library which can check whether a given function (which only takes in boolean parameter(s)) is a good or bad function. There was a condition given according to which we had to evaluate if it was good or bad. For completeness, I would mention that the given condition was such that the if the function evaluates to true for either a positive or negative value of the passed parameter, then it is a good function. We discussed the tradeoffs and my choices why I went for a certain way and implemented feedback whenever the interviewer tried to point out any.
I think most of the questions I got are mentioned in this post by a fellow Leetcoder: https://leetcode.com/discuss/post/5963463/googlyness-frequently-asked-questions-by-55sh/