Google L5 interview Experience (rejected)
Summary
I recently interviewed for an L5 Staff Software Engineer role at Google. Despite putting in significant preparation and clearing the initial rounds, I was ultimately rejected after struggling with the second onsite technical interview. I'm sharing my experience and the specific questions I faced to help others preparing for similar roles.
Full Experience
I've been practicing Data Structures and Algorithms for about three years, always hoping for an opportunity at Google. My resume often got rejected, but in November, my wish came true when a Google recruiter contacted me via LinkedIn for interview rounds.
Phone Screen
This round involved a Dynamic Programming problem. I don't recall the exact question, but it was similar to finding the size of the largest identical binary tree subtree within a given tree. I successfully solved it by applying DP memoization to reuse results from already computed subtrees, which helped me clear this round.
Two days later, the recruiter informed me I was on the borderline, with a "leaning Hire" assessment, and I proceeded to the Onsite rounds. I took a month to prepare for these, focusing on Google assessment contests on LeetCode, daily and weekly problems, and Google's previously tagged questions from the last three months. I felt confident, but I was wrong!
Onsite Round 1 (February 2025)
The interviewer presented a unique problem. There was a lot of confusion and discussion between us during this round. However, I managed to successfully code the solution correctly at the very last moment, which I believe saved me. The recruiter ultimately gave me a "Leaning No Hire" feedback.
Despite the "Leaning No Hire", my recruiter remained positive because I had coded the problem correctly, and I was advanced to the second Onsite round.
Onsite Round 2
This round was incredibly tough, and I felt completely overwhelmed. The interviewer grilled me, and I couldn't get anywhere near an optimized solution. I did manage to code a brute force solution, which was O(N^2), but the recruiter was clearly not happy with it.
Before that main question, he asked a simpler one: to choose a root in the given graph to form a valid binary tree, ignoring colors. After a hint, I quickly realized any node with a degree less than or equal to 2 would work and coded it fast. Then came the main challenge with the alternating colors, where my brute-force DFS approach for each node to check alternating patterns was not what they wanted for an O(N) solution.
The next day, the interviewer called to deliver the bad news: the review was not positive, resulting in a "No Hire." My third round didn't even happen. The recruiter advised me to prepare further and reach out again in six months. Overall, despite the rejection, it was a very good learning experience.
Interview Questions (3)
Please write a function that takes two rhyme schemes, one short and one long, and, if possible, extends the short one to make them equivalent.
Examples:
ABB,ABBBA->ABBBADEE,ABBBA->DEEEDAAB,OORRQQ->AABBCC(orAABBDD, etc.)ABB,OORRQQhas no valid extension
Given an undirected acyclic graph where each node has at most 3 edges. Without considering node colors, choose a root such that the graph forms a valid binary tree when rooted at this node.
Given an undirected acyclic graph where each node has at most 3 edges. You are also given a color list containing the color of each node (Black or White).
You need to find a root such that:
- It forms a valid Binary tree when rooted at this node.
- It forms an alternating color pattern (e.g., BWBW or WBWB) across its levels.
Preparation Tips
For my initial phone screen, I had already built a strong foundation, having practiced Data Structures and Algorithms consistently for about three years.
Before the onsite rounds, I dedicated a full month to intensive preparation. My strategy included:
- Solving all the Google assessment contests available on LeetCode.
- Consistently tackling daily and weekly LeetCode problems.
- Participating in LeetCode contests.
- Focusing specifically on Google's previously tagged questions from the last three months on LeetCode.
I felt confident with this preparation, but the onsite experience proved to be more challenging than expected.