Google swe sre Dublin phone screen
swe sreGoogle Interview: Filesystem Handling
Google | L4 | Reject
SDE IIGoogle Web Solution Engineer Interview Experience
Web Solutions EngineerGoogle L3 Interview Experience
SDE I61 more experiences below
Summary
I had a phone screen for a SWE SRE role at Google in Dublin, which involved solving several prime number-related algorithmic problems, including designing an algorithm for 'supercut' prime numbers and implementing an optimized Sieve of Eratosthenes.
Full Experience
I recently had a phone screen for a SWE SRE position at Google in Dublin. The interview lasted about 1 hour and 5 minutes and involved a series of algorithmic challenges. I started with a simple prime number problem, which then evolved into designing an algorithm for what they called 'supercut' prime numbers. I was asked to optimize my solution further. Following this, I was tasked with implementing the Sieve of Eratosthenes algorithm and then optimizing that solution as well. There were more than 5 follow-up questions throughout the discussion.
Interview Questions (3)
I was asked to solve a simple problem related to prime numbers. This likely involved checking if a given number is prime or finding primes within a basic range.
After the initial prime number problem, I was challenged to design an algorithm for 'supercut' prime numbers. The task also involved optimizing the developed code.
I was asked to implement the Sieve of Eratosthenes algorithm. Following the implementation, I had to further optimize the algorithm, likely focusing on time or space complexity.
Summary
I recently interviewed at Google, where I tackled a problem involving filesystem handling, specifically calculating directory sizes and discussing optimization strategies within a Python dictionary representation.
Full Experience
During my interview at Google, I was presented with a problem that simulated a filesystem using a Python dictionary. Each node could be a file with a size or a directory containing children. My primary task was to implement a function, get_size(), to determine the total size for any given key in the filesystem. Following this, we explored various approaches to optimize the size calculation, particularly focusing on caching techniques. The discussion also extended to the fundamental properties and invariants expected in a robust filesystem, such as the absence of cycles, ensuring every file belongs to a directory, and maintaining unique children per directory.
Interview Questions (1)
You have a file system represented as a Python dictionary. Each node is either a file or a directory. Directories can contain other directories or files as children. For example:
fs = {
1: { "type": "directory", "name": "root", "children": [2, 3] },
2: { "type": "directory", "name": "dir", "children": [4, 5] },
4: { "type": "file", "name": "file1", "size": 100 },
5: { "type": "file", "name": "file2", "size": 200 },
3: { "type": "file", "name": "file3", "size": 300 }
}
Tasks:
- Write a function
get_size()that returns the total size for a key. - How to optimise the size calculation with caching if needed.
- Discussion about what is expected from a typical filesystem. I could come up with the following:
- No cycles: a directory cannot include itself directly or indirectly.
- Every file belongs to at least one directory.
- No two directories share the same child.
- No directory contains a non-existent child key.
Summary
I recently interviewed for an L4 role at Google in India and unfortunately received a reject. My experience included a screening round and multiple onsite rounds covering coding, design, and behavioral aspects, with mixed results across different sections.
Full Experience
My interview process for the L4 role at Google in India took place in August 2025. It started with a screening round, followed by several onsite rounds, including coding, system design, and a 'Googlyness' interview.
Screening Round
In the screening round, I was presented with two coding problems:
- The first problem was Remove All Adjacent Duplicates In String. I implemented a single-pass solution using a vector, which seemed to work well, and I successfully dry ran my approach.
- The second problem was Russian Doll Envelopes. I solved this using the Longest Increasing Subsequence (LIS) algorithm combined with a binary search approach, and also performed a dry run.
Based on the feedback I received, my performance in this round was perceived as 'Strong Hire' (SH).
Onsite Rounds
Round 1: Coding
The first onsite round was a coding challenge. The interviewer presented a problem that seemed to be a variant of a Google L3 level question. I struggled with this one, and the feedback indicated a 'Strong Hire' (SH) decision for this round, which I found surprising given my performance.
Round 2: Coding
This round also involved two coding problems:
- The first was an ad-hoc probability question, which unfortunately I don't recall the specifics of. It was conceptually similar to Maximum Students Taking Exam but was an easier variant. I managed to solve it and completed a dry run successfully.
- The second problem was Path With Maximum Probability, or something very similar. I wasn't able to devise an optimal solution or perform a complete dry run. I also didn't take the hints provided by the interviewer, which likely contributed to my 'Not Hire' (NH) feedback for this round.
Round 3: System Design
This round started quite unusually. The interviewer presented a rather abstract problem related to a rhyming scheme, which was very unclear to interpret. After a brief, somewhat circular discussion where I tried to clarify the problem, the interviewer decided to switch gears after only about seven minutes, stating that candidates often find that problem difficult. We then moved onto a standard system design problem, for which I felt my explanation and approach were quite good. Despite not solving the initial coding problem, the feedback for the design part was positive, although the overall round was marked as 'Not Hire' (NH).
Round 4: Googlyness
The final round was a 'Googlyness' interview. I felt this went reasonably well, and the feedback was either 'Hire' (H) or 'Strong Hire' (SH), though at that point, it probably didn't significantly impact the overall outcome.
Ultimately, I received a reject for the L4 position.
Interview Questions (3)
You are given a string s, which consists of lowercase English letters. A duplicate removal consists of choosing two adjacent and identical letters, and removing them. We repeatedly make duplicate removals on s until we no longer can. Return the final string after all such duplicate removals have been made. It can be proven that the answer is unique.
You are given a 2D array of integers envelopes where envelopes[i] = [wi, hi] represents the width and height of an envelope. One envelope can fit into another if and only if both its width and height are strictly greater than the other envelope's width and height. Return the maximum number of envelopes you can Russian doll (i.e., put one inside another).
You are given an undirected graph with n nodes, numbered from 0 to n - 1. You are given an array edges where edges[i] = [u, v] means that there is an edge between nodes u and v. You are also given an array succProb of length edges.length where succProb[i] is the probability of success of traversing the i-th edge. The graph has at most one edge between any any pair of nodes. Return the path with the maximum probability of success to go from start node to end node. If there is no path from start to end, return 0. The answer will be accepted if it differs from the true answer by at most 1e-5.
Summary
I recently interviewed at Google for a Web Solutions Engineer position after being contacted by a recruiter. My interview experience included a detailed round focused on DSA, problem-solving, and web technologies, specifically designing a Product Inventory System. Despite presenting an optimal solution and explaining trade-offs, I unfortunately received a lean no-hire outcome.
Full Experience
My journey with Google began when a recruiter reached out to me via LinkedIn. After an initial application, I had a conversation with the recruiter who provided details about the role and posed a few fundamental computer science and web tech questions, touching upon HTML, CSS, JavaScript, and data structures & algorithms. Following this introductory round, I was informed that I would be moving forward to the next stage, and the overall interview process was thoroughly explained.
In my main technical round, which covered DSA, problem-solving, and web tech, I was challenged to design a Product Inventory System. The core requirement was that each seller could submit an order with a price and timestamp, and the system needed to efficiently support a getMinPrice() API to retrieve the order with the lowest price. I proposed a min-heap-based approach for this. A follow-up question required supporting the removal of orders by sellers at any time. I addressed this by suggesting lazy deletion to avoid the overhead of immediate heap updates. We also delved into time complexity trade-offs and explored potential optimizations, including the use of a self-balancing binary search tree, similar to Java's TreeMap, for more efficient removals and better order management. Despite arriving at an optimal solution and clearly articulating my design choices and their trade-offs, the outcome was a lean no-hire.
Interview Questions (1)
I was asked to design a Product Inventory System. Each seller could submit an order with a price and timestamp. The system needed to support a getMinPrice() API that returns the order with the lowest price. A follow-up required sellers to be able to remove their orders at any time.
Summary
I interviewed for an L3 position at Google Bangalore, going through several technical rounds covering data structures, algorithms, and system design, along with behavioral questions. The process concluded with a team matching round, which took some time.
Full Experience
My Google L3 Interview Experience
I applied for the L3 position at Google Bangalore through a referral.
TPS Round
The first round focused on a problem involving family members' birthdays. I was asked to devise a data structure or function that could output the name of the member whose birthday is next from a given date, with the sequence being circular. I proposed a simple sorted array based on birthdays. The interviewer was very interested in exploring various modifications to the question and discussing all possible solutions.
Round 1 (Technical)
The first proper technical round started with a graph problem. I was given a graph of cities and travel times between them, and a source city A along with a list of favorite cities. The goal was to find the smallest time taken to reach any of the favorite cities from city A. I solved this using a simple Dijkstra's algorithm.
The follow-up to this question was more complex: in the same network, given city S and city T, and a list of favorite cities, I had to find the shortest path from S to T that must go through at least one of the favorite cities. I presented two approaches: one using Floyd Warshall and another using Dijkstra's algorithm twice (once from S and once from T) and then looping over the favorite cities to find the shortest combined distance.
Round 2 (Technical)
This round involved movies and their ratings within a network where movies with the same genre were connected. I needed to return a list of K most highly rated movies related to a given movie A. My solution involved building a graph from the movie relations and then performing a BFS from movie A while maintaining a Min Heap of size K to keep track of the top-rated movies.
As a follow-up, the interviewer asked me to explain the Quick Select method as an alternative to using a heap for this problem.
Round 3 (Technical)
This round presented a problem with pairs of strings, where each pair had exactly one character mismatch. This mismatch represented a parent-child relationship, forming character chains (e.g., 'abc','abe' -> c->e; 'abe','abf' -> c->e->f). Given a list of these pairs, I had to find the length of the longest such chain, with the constraint that each character would have only one parent and one child.
The follow-up modified the problem: from the pairs of strings, we could now form a Polytree (a tree with multiple children and multiple parents). The task was to find the length of the longest chain in this Polytree. I approached this using dynamic programming to find the longest chain for each child.
Round 4 (Googlyness)
This round consisted of generic behavioral questions, focusing on Google's 'Googlyness' principles.
Team Matching
After the interview rounds, it took about 2-3 months to get to the team matching round. This stage also involved generic behavioral questions to assess fit within potential teams.
Interview Questions (9)
Given a tree of family members and their Date of birth. We have to come up with data structure or fuction which should output the name of member whose birthday is next from given date, the sequence should be circular.
Given graph of cities and time taken to travel between them. You have given source city A and list of favourite cities. Output the smallest time taken to reach any of the favourite cities from city A.
Now in the same network of cities, you have given city S and city T and list of favourite cities. We have to give the shortest path from city S to city T which must go through atleast one of the favourite city.
You have given movies and movies network ( movies which have same genere) and rating for each of these movies. You have to reture list of K most highly rated movies which are related to movie A.
Just explain the quick select method for solving this instead of using the heap.
We have given list of pair of strings. Each pair of string has exatly 1 character mismatch in them. we can assume that the character which are mismatched have parent -> child relation and can from chain of multiple characters.
Eg. ('abc','abe') -> Parent ->child :: c->e
Eg. ('abe','abf') -> Parent ->child :: c->e->f
Form list of these pairs we would get chains of characters. We have to find the lenght of the longest such chain. It is given that the 1 chracter would have only 1 parent and 1 child.
Now from the pairs of strings we can form the Polytree ( tree with multiple child , multiple parents). We have to find length of longest chain.
Generic behaviourial questions.
Generic behaviourial questions.
Summary
I had my first round interview for a Software Development Intern position at Google. I was given a complex Binary Tree problem involving node value manipulation, node swapping, and subtree removal based on the mode. I successfully solved it, achieving O(n) time and space complexity, and also discussed a follow-up question on swapping two numbers.
Full Experience
I recently had my first-round interview for the Software Development Intern position at Google. The interview lasted 45 minutes. I was presented with a challenging Binary Tree problem that required me to implement several operations. First, I needed to replace each node's value with its reciprocal. Second, I had to swap the left and right children of each node (not their values). Finally, if a node's value was the arithmetic mode (the most repeated value in the entire tree), I had to remove that node and its entire subtree.
I managed to solve the problem efficiently, achieving O(n) time and space complexity by using a map for frequency counting and then traversing the tree to apply the transformations and removals. My solution involved a helper function to count frequencies and another to perform the transformations recursively.
The interviewer also asked a follow-up question on how to implement a function to swap two numbers.
Interview Questions (2)
Given a Binary Tree where all nodes have float64 values, implement the following operations:
- Replace each node's value with its reciprocal.
- Swap the left and right children of each node (not their values).
- If a node's value is the arithmetic mode (the most repeated value in the entire tree), remove that node and its entire subtree.
The solution should handle basic constraints and consider non-zero division for reciprocals.
How would you implement a function to swap two numbers?
Summary
I recently interviewed at Google for a phone screen, and the main challenge was to implement a restaurant waitlist system.
Full Experience
My Google phone screen involved a task to design and implement a restaurant waitlist. I focused on ensuring the system could efficiently handle parties joining and leaving the list, and then intelligently seat the first suitable party when a table became available. We discussed various data structures and edge cases to ensure robustness.
Interview Questions (1)
Implement a restaurant waitlist. It should support the following features: A party of customers can join the waitlist. A previously joined party can leave the waitlist at any time. The restaurant serves the first party whose size fits the empty table size at a time (a table size is given as an argument).
Summary
I had an onsite round interview at Google for an L4 position where I was given a dynamic programming style problem related to electoral votes.
Full Experience
During my Google L4 onsite round, I was presented with a challenging problem involving electoral votes. The interviewer asked me to find the number of different combinations of states won by Party 1 that would lead to their candidate being elected.
Interview Questions (1)
Imagine that each state is assigned a number of votes as follows:
Alabama = 9 Alaska = 3 Arizona = 11 Arkansas = 6 .... Wyoming = 3 For the purpose of this question, assume that all states are "winner takes all." The winner of a state gets all the votes for that state.
To be elected, a candidate must win more than total_votes / 2. The candidate from Party 1 is running against the candidate from Party 2. candidate. How many different combinations of states won by Party 1 are there that will elect the Party 1 candidate?
For example, if Party 1 wins every state, the Party 1 candidate wins. If they win every state but lose Alabama, the candidate still wins.
Another example with three states:
StateA = 3 StateB = 4 StateC = 8 If Party 1 wins every state, their candidate will get elected. If they win StateA and StateC, their candidate will still get elected. If they win StateA and StateB but lose StateC, their candidate will not get elected.
Summary
I interviewed for an L4 Software Engineer role at Google Bangalore in April 2025. After navigating through a phone screen, multiple DSA rounds, and a Googlyness assessment, which involved numerous reschedules, I unfortunately faced rejection, resulting in a 12-month cooldown period.
Full Experience
Hi Everyone,
I had my Google interview experience in April 2025. A recruiter approached me and scheduled an initial phone screen after I requested a week's preparation time. The phone screen involved a question that boiled down to using a Min Heap of size K to maintain the top K elements. I coded the solution and walked through it.
Ten days later, I received feedback: I solved the problem without hints but didn't walk through the code until asked. I was selected for onsite rounds and given 26 days to prepare.
All four onsite rounds (three DSA, one Googlyness) were scheduled for the same week.
📞 Round 1: This round had a straightforward Topological Sorting + BFS question. The interviewer, from an infra team, seemed disengaged, yawning and toggling her camera. She struggled to understand Kahn's algorithm, but was satisfied once I coded and explained it.
📞 Round 2: Rescheduled as the interviewer didn't join.
📞 Round 3: With a Principal Engineer who joined late. He started by asking if I was tense, which paradoxically made me tense. The question was a Medium-level Line Sweep Algorithm problem with intervals. I answered and coded, seeming to satisfy him. At the 37-minute mark, he asked about duplicates in interval ranges. I began explaining the necessary logic changes, but he told me to stop, saying we might run out of time. Lesson learnt: Always consider duplicates, even if not explicitly in sample input or initially mentioned.
📞 Round 3 (Rescheduled): Interviewer didn't join.
📞 Round 4 (Googlyness): Rescheduled as interviewer didn't join.
📞 Rescheduled Round 2: This interviewer was super interactive. The initial question involved log messages (string + timestamp) and printing only if a message hadn't appeared in the last 10 seconds. I used a simple map<string, int> and updated timestamps. I coded the approach, modifying the structure based on his expectations.
Follow-up 1: He asked about the bottleneck in real-time. I identified memory if all messages were unique. I proposed a cleanup using a queue and map, which he agreed with, and I coded it quickly.
Follow-up 2: A log message should be printed only if it hadn't occurred in the previous 10 seconds and wouldn't occur in the next 10 seconds. I couldn't figure it out in 5 minutes, even with a hint to use the previous cleanup function. I solved it just after the interview. Lesson learnt: Always focus on the interviewer's hints.
Rescheduled Googlyness 2: A Russian interviewer joined, thinking it was a DSA round, so it was cancelled and rescheduled.
Rescheduled Googlyness 3: Recruiter emailed that the interviewer had an emergency, so it was rescheduled again.
Rescheduled Googlyness 4: Finally, an L3 interviewer from Warsaw who was super cool. After four postponements, I had mastered all Googlyness questions and was ready with four STAR pattern stories. She was very impressed, and I felt confident about a strong hire here.
Final Verdict: ❌ Rejection. No feedback was provided. I'm now in a 12-month cooldown period, but the recruiter said she'd reach out again. I will definitely try again after the cooldown.
Interview Questions (6)
The question required me to use a Min Heap of size K to continuously maintain the top K elements from a stream of incoming data.
This was a straightforward problem that required applying Topological Sorting, specifically using a Breadth-First Search (BFS) based approach.
The problem involved applying the Line Sweep Algorithm to efficiently handle and process a given set of intervals.
I was given a stream of log messages, each consisting of a string message and a timestamp. The initial task was to print a message only if the same message had not occurred in the last 10 seconds relative to its current timestamp. My interpretation for printing was if the current_timestamp - last_seen_timestamp > 10. Example: If 'Leetcode' appears at timestamp 6, then again at 15. If 15-6=9, it implies it was seen within 10s, so it should not print again. The original prompt stated: 'Print only those messages if the same message is not present in last 10 seconds.'
This was a follow-up to the log message filtering question. The interviewer asked about the bottleneck of the previous approach in a real-time system, specifically regarding memory usage if all messages were unique.
This was a second follow-up question. The requirement was to print a log message only if it had not occurred in the previous 10 seconds and would not occur in the next 10 seconds relative to its timestamp. For example:Leetcode 6Leetcode 15Java 1Java 12Java 23
Output:Java 12 (as 'Java' is not present in the time window [2,22])Java 23 (same logic for 'Java 23')
Preparation Tips
My key takeaways and preparation insights include: always asking for a mock interview with the recruiter when onsite rounds are scheduled for Google, as the interview time is very tight (typically 2-3 minutes for intro, 37 minutes for the problem, and 5 minutes for candidate questions). For an L4 role, the grading criteria are extremely strict, expecting production-ready code with thorough handling of every corner case. I also learned to always walk through my code after writing it, even if the interviewer doesn't explicitly ask. For the Googlyness rounds, after multiple postponements, I had extensively practiced and mastered common behavioral questions, preparing four distinct stories using the STAR pattern, which significantly impressed the interviewer.
Summary
I interviewed for an L4 position at Google via phone and was rejected. I tackled a geometric problem involving finding squares from 2D coordinates but couldn't optimize my solution as requested.
Full Experience
I recently had a phone interview with Google for an L4 position in the U.S. The interviewer presented me with a geometric problem involving 2D integer coordinates. I had to identify all unique squares whose four corners were present in the input list of points and return their top-left corner and side length. I managed to come up with an O(n*m) solution, but the interviewer pressed for optimizations. Unfortunately, I wasn't able to devise a better approach within the given time. The interview concluded with my rejection.
Interview Questions (1)
Given a list of 2D integer coordinates, look for squares whose four corners occur in the input. Return the upper left corner and the side length of all such unique squares, in any order.
Input:
points = [
{"x": 2, "y": 4}, # top-left
{"x": 4, "y": 4}, # top-right
{"x": 2, "y": 2}, # bottom-left
{"x": 4, "y": 2}, # bottom-right
{"x": 5, "y": 5}, # extra random point
{"x": 0, "y": 0} # extra random point
]Output:[{'x': 2, 'y': 4, 'side': 2}]Summary
I participated in an onsite interview at Google in the US, where the main challenge involved a complex graph traversal problem focused on counting lakes within an island grid under specific conditions.
Full Experience
I had an onsite interview at Google in the US. The session started with a unique problem: 'Count the number of lakes in an island.' I was given a large m * n grid and an island coordinate. The task was to determine the number of lakes within that island. A critical detail was that any lake connected to the surrounding ocean should not be counted. The problem statement initially had some ambiguities, and I spent the first 15 minutes asking clarifying questions to fully grasp the requirements, especially regarding how to handle the large grid size and distinguish lakes from the ocean.
Interview Questions (1)
Given a large grid of m * n and an island coordinate within it, I needed to calculate the number of lakes from that coordinate. The grid could have multiple islands, all surrounded by a large ocean, and I could assume ocean outside the grid boundaries. I clarified that there could be zero or more lakes, and crucially, if a lake within an island was connected to the ocean, it should not be counted. The main constraint highlighted was the grid's immense size, requiring an efficient method to distinguish lakes from the ocean.
Summary
I interviewed for a Google University Graduate position, successfully navigating the first DSA round with a graph and string problem, but unfortunately struggling with a Coin Change variation in the second round, which likely led to my rejection.
Full Experience
I recently had my interview experience for a Google University Graduate 2026 position.
My first round was a 45-minute Data Structures & Algorithms (DSA) session. The question involved an implementation-heavy graph problem where the nodes themselves were strings. It could be solved using standard graph traversal techniques. I implemented a BFS solution and was able to complete it within the allotted time, without needing any hints from the interviewer, who was very friendly. There was also a follow-up question which I managed to solve easily using a heap. My prediction for this round was a Strong Hire / Hire.
The second round also lasted 45 minutes for DSA, followed by 15 minutes for a Googliness assessment. The DSA question was described as a variation of the classic Coin Change problem, which is available on LeetCode. Unfortunately, this interviewer was not as friendly and provided no hints. I spent the entire time trying different approaches to figure out the solution, but I couldn't land on the correct one, and as a result, I wasn't able to write any code within the given 45 minutes. The Googliness portion of the interview, however, went fine. My prediction for this round was Strong No Hire / No Hire / Lean No Hire.
It's been two weeks since my last interview, and I haven't received any response, which likely means I was rejected.
Interview Questions (1)
I was presented with an implementation-heavy graph problem where the nodes were represented by strings. The solution required using graph traversal techniques.
Summary
I underwent a challenging and protracted L4 interview process at Google India, which included multiple coding and behavioral rounds, several reschedules, and ultimately resulted in a rejection despite initial positive feedback and assurances of an offer.
Full Experience
Overview
I was approached by a recruiter for an L4 position at Google India. After discussing the process and location options, a phone screening was scheduled for me. I had been grinding LeetCode for about a month, and the interview went smoothly—I coded the follow-up well within time and even had some time left for chit-chat. I felt confident I’d be called for onsites soon.
However, I was met with radio silence for almost 3 months.
After 3 months, the recruiter reached out saying they had “missed” giving me feedback earlier. They told me it was a Strong Hire and invited me to proceed with onsites. They gave me a little over 3 weeks, saying the position might close soon, so the process needed to be wrapped up quickly. I agreed, and 3 onsite rounds were scheduled across consecutive days.
The first onsite didn’t go very well, as I rushed through the solution. The recruiter later told me the interviewer had flagged missed test cases and asked me to be more careful in the next rounds.
The second onsite didn’t even happen—the interviewer didn’t show up. When I contacted the recruiter, they promised to reschedule.
The third onsite did happen and went very well—I solved everything optimally, including the follow-up. Feedback was positive, which gave me some hope.
But the rescheduled second onsite was a disaster: the interviewer didn’t show up again. It got rescheduled twice more, and both times the interviewer didn’t show up. After three no-shows, I was frustrated and asked for a break before trying again.
Finally, the second onsite happened after three reschedules. It was tough—I couldn’t complete the follow-up, though the interviewer assured me completion wasn’t expected. I was doubtful about feedback, but the interviewer appreciated my critical thinking and gave positive feedback.
Then came the G/L round, which went average. I stumbled on a question about handling cultural diversity and couldn’t give a strong example. Feedback: Lean Hire.
Next, I went through Hiring Manager / Team Matching rounds, which both went very well. I matched with two teams, and both managers gave positive feedback. After the first HM round, the recruiter even told me my packet was “very good” and ready for the Hiring Committee (HC).
HC, however, flagged concerns about my first coding round and suggested another round for certainty.
I did the additional coding round and it went well. I coded the follow-ups on time, and we even discussed some Java intricacies afterward. The recruiter told me feedback was positive.
When I asked about my chances, the recruiter replied: “100%—we’ll close the offer next week.”
But from here things went downhill. No updates for over a week, then suddenly I was told my packet had been down-leveled to L3. I asked if I could do more rounds to bring it back to L4, but got no response. After a month of silence, I finally received a rejection email.
This entire experience left me physically and emotionally drained—so much so that I delayed writing this post for almost a year and a half. The lesson: until the offer is in your hands, don’t get your hopes up when interviewing at Google.
Interview Questions (6)
A problem involving graph ring traversal and validation.
A problem on forest traversal with ratings, requiring optimization techniques like sliding window, deque, and dynamic programming.
A modified version of the Russian Doll / Box Stacking problem, including a follow-up about handling rotations.
A sentence scoring problem, followed by a discussion on Java intricacies, specifically comparing ArrayList vs LinkedList.
Behavioral questions focused on topics such as handling cultural diversity, meeting deadlines, and demonstrating leadership qualities.
Preparation Tips
I prepared for approximately a month by grinding LeetCode problems.
Summary
I had a phone screen for an L3 role at Google in the USA where I was presented with a problem involving mapping IP addresses to their most specific prefix, which I failed to solve, leading to my rejection.
Full Experience
I recently had a phone screen interview for an L3 position at Google in the USA. The interview focused entirely on a single coding problem. I was given a task to map IP addresses to their corresponding prefixes based on a given list of prefix rules. I struggled significantly with the problem, failing to identify the correct data structure and approach, and ultimately couldn't come up with a working solution. This directly led to my rejection from the role.
Interview Questions (1)
Given a set of IP prefixes and a set of IP addresses, map each IP address to its most specific matching prefix. If no specific prefix exists for an IP address, it should be mapped to the wildcard prefix '*'.
Prefix examples provided:
*192.168.*192.168.2.*192.168.2.1
0.0.0.0192.168.7.1192.168.2.3192.168.2.1
0.0.0.0 → *192.168.7.1 → 192.168.*192.168.2.3 → 192.168.2.*192.168.2.1 → 192.168.2.1
Summary
I recently completed an onsite interview at Google for an L3 position. The experience involved three distinct technical rounds, each presenting a challenging coding problem focused on data structures and string manipulation.
Full Experience
I had an insightful onsite interview experience with Google for an L3 position, which was structured into three main coding rounds.
First onsite:
This round focused on data structure design. I was tasked with implementing a restaurant waitlist. The key requirements were to allow parties to join, leave, and to serve the first suitable party based on available table size. This required careful consideration of efficient insertion, deletion, and search operations, likely involving a combination of data structures like a min-heap or priority queue along with a hash map for quick lookups.
Second onsite:
The second challenge involved string manipulation and parsing. I was given a formula of letters with parentheses and asked to simplify it by removing the parentheses, ensuring correct sign propagation and handling nested structures. This problem tested my ability to manage state during string traversal, possibly using a stack-based approach to keep track of current signs and parenthesis levels. Examples like a-(b+c) -> a-b-c and a-(a-b) -> b were provided to clarify the expected behavior.
Third Onsite:
The final coding round was another complex string parsing problem: decompressing an encoded string. The encoding involved repeating groups of characters within parentheses, with the repetition count specified in curly braces, and supporting nested parentheses. For instance, a(bcd){3}e should become abcdbcdbcde, and a(bc(d){4}e){3}f should expand to abcddddebcddddebcddddef. This was a classic stack-based string decoding problem, demanding careful handling of nested structures and repetition counts.
Interview Questions (3)
Implement a restaurant waitlist data structure. It should support the following features:
1. A party of customers can join the waitlist.
2. A previously joined party can leave the waitlist at any time.
3. The restaurant serves the first party whose size fits the empty table size at a time (a table size is given as an argument).
Given a formula of letters with parentheses, return a simplified equivalent version of the formula without parentheses. Also handle nested parentheses.
Examples:a-(b+c) -> a-b-ca-(a-b) -> b
Write a function to decompress a string from an encoded format. A group of characters surrounded by parentheses should be repeated by the number in the following curly braces. Note that the parentheses can be nested.
For example:"a(bcd){3}e" -> "abcdbcdbcde""a(bc(d){4}e){3}f"-> "abcddddebcddddebcddddef"
Summary
I recently interviewed for an L4 position at Google. I encountered a problem that was a variation of the 'Partition Equal Subset Sum', which I successfully solved using a 0-1 Knapsack dynamic programming approach.
Full Experience
My onsite interview for an L4 role at Google was quite an experience. During the technical round, the interviewer presented me with a coding challenge. It turned out to be a variation of the well-known 'Partition Equal Subset Sum' problem. While it wasn't exactly the standard problem, understanding the underlying principle made it straightforward to approach. I developed and explained a solution using the 0-1 Knapsack algorithm, which seemed to satisfy the interviewer.
Interview Questions (1)
During my technical interview, I was presented with a problem that was described as a 'variation of Partition Equal Subset Sum'. The problem's essence involved determining if it's possible to partition a given set of numbers into two subsets such that the sum of elements in both subsets is equal. Although the exact specifics of the variation weren't explicitly detailed in the post, the core concept revolved around this classic dynamic programming problem.
Summary
I had a phone screening interview with Google for an L4 position, where I was challenged with a problem involving stream processing and triplet formation.
Full Experience
During my Google L4 phone screen, I was presented with an interesting data structure problem. The task involved continuously processing a stream of integers. For each new number, I needed to determine if a triplet could be formed from the current set of numbers in memory such that the difference between the maximum and minimum of the three numbers was at most a given value d. If such a triplet was found, it had to be immediately removed and returned. This required careful consideration of how to efficiently manage the numbers in memory and quickly identify valid triplets as they arrived.
Interview Questions (1)
You are given a stream of integers arriving one by one, and an integer d. At any time, you may form a triplet of numbers from the stream if the difference between the maximum and minimum of the three numbers is at most d. Once a triplet is formed, those three numbers must be immediately removed from memory and cannot be reused in any other triplet.
Design a data structure that processes the stream online:
- When a new number arrives, insert it into memory.
- If any valid triplet can be formed, remove it immediately and return it.
Continue this process for the entire stream.
Summary
I successfully cleared the Google L3 SWE interview process after several technical and behavioral rounds, ultimately receiving a strong hire feedback and an offer. The entire process, from initial contact to offer, spanned approximately six months.
Full Experience
My journey with Google for the SWE L3 role began in mid-January 2025 when I first connected with a recruiter. After expressing my interest and staying in touch for about a month, my interviews were scheduled.
The eliminator round took place in early March. The interviewer promptly started with introductions and then presented an open-ended problem: "Create a Python class for implementing a directory structure to store files in a file system." After asking several clarifying questions, I quickly implemented a solution using a Trie. The interviewer was satisfied and extended the problem to incorporate file sizes, requiring me to report the total size of a given folder or file. I successfully implemented this, and the problem was further extended to include a delete feature, which I also managed to implement within the time limit. I even optimized my solution, coded everything properly, and demonstrated a dry run.
Two weeks later, I received the good news that I had cleared the eliminator round and would be moving on to the onsite interviews, which consisted of three technical rounds and one 'Googlyness' round.
Towards the end of March, I commenced my onsite interviews.
- Round 1: This round started with introductions, followed by a DFS-based question. It involved graph creation from an array using intuition and determining node connections, somewhat akin to topological sorting, moving from top-most nodes to leaf nodes.
- Round 2: I was asked to implement a PowerShell-style system. The problem statement initially felt vague, so I asked many clarifying questions to understand the requirements fully. I was specifically asked to implement error handling for invalid inputs, such as circular dependencies or incorrect string formats.
- Round 3: This round featured a series of easy DSA questions, posed rapidly. Topics included sorting, iterating, and optimizing for memory and time. Examples included printing the next 'n' odd numbers starting from 't', and grouping and sorting class objects while preserving the relative order of identical elements.
- Round 4: This was a standard 'Googlyness' round. It went exceptionally well, and I had a very interesting and healthy discussion covering my work experience, hobbies, and academics.
About two weeks after the onsite rounds, I received a call from the recruiter, who congratulated me on clearing all interviews. I received strong hire feedback across all my rounds.
Over the next two months, I participated in team matching rounds, one for the Bangalore office and one for the Hyderabad office. I politely declined one team match as I felt it didn't align with my career aspirations. Finally, at the end of June, I received the call that they were proceeding with an offer, and I received my offer letter shortly thereafter.
Overall, my experience was positive. I have no complaints, understanding the immense scale of Google's hiring process, with hundreds of candidates interviewed monthly. I knew it would take months. My recruiter was consistently helpful, always responding to my concerns and follow-ups. All interviewers were punctual and very kind throughout the process.
Interview Questions (3)
Design and implement a Python class to represent a file system's directory structure. The core requirements were to store files, calculate the total size of a given folder or file (including all its sub-elements), and implement a delete feature. Optimization of these operations was also a key aspect.
Given an integer t as a starting point, print the next n consecutive odd numbers following t.
Given a collection of custom class objects, implement a mechanism to group them based on a certain criterion and then sort these groups. Crucially, the relative order of elements that are considered equivalent during sorting must be preserved (stable sort).
Summary
I interviewed for a Google SWE II (L3) position, which focused on recursion and tree traversal. I successfully cleared the interview, but the hiring process is currently on hold due to a freeze.
Full Experience
Hello everyone,
My background includes graduating from a Tier-1 college in 2023 with 2 years of experience as an SDE-1. I recently interviewed for the Google SWE II (L3) position for a phone screening round.
The interview questions primarily tested my understanding of recursion and tree traversal. Fortunately, I received what I considered easy questions, but the interviewer thoroughly questioned me on the worst and best time and space complexities for each solution. We had about 10-15 minutes remaining at the end, which we used to have a casual discussion about our typical workdays.
I later received an update from the recruiter informing me that I have cleared the interview. However, they also mentioned that hiring is currently frozen, so there are no further updates as of now.
Interview Questions (2)
You're given a tree structure where each node represents a directory with a unique ID and a name.
struct Node {
int id;
string name;
vector<Node*> directories; // children
};
Your task is:
For each node, check whether any of its ancestors (up to the root) have the same name. If a duplicate is found, print the id of that node.
Example:
a
└── b
└── c
└── b <- duplicate (same name "b" as ancestor)
Output: id of second b (since it shares the name with its ancestor).
This is a modification of the previous task: Same as above, but only check up to the last K ancestors. If the duplicate occurs beyond K levels up, ignore it.
Example (K = 2):
a
└── b
└── c
└── d
└── e
└── b <- NOT a duplicate (original "b" is more than 2 levels up)
Output: None
If K = 5, then the second "b" would be considered a duplicate.
Summary
I successfully navigated the Google SRE-2 interviews in Warsaw, ultimately receiving an offer after several challenging rounds, including behavioral questions and advanced data structures and algorithms problems.
Full Experience
My journey to Google Warsaw for an SRE-2 role was both challenging and rewarding. I had been preparing intensely since March 2024, having already solved over 1500 LeetCode questions. This was my first MAANG interview, so I was quite nervous during the onsites.
My screening round was detailed, as described in this LeetCode post.
The first onsite round was a Googlyness (behavioral) round with an interviewer from Switzerland. I was asked to describe a time when I had to pivot midway at work, and another time when my actions positively impacted my team. There were in-depth follow-up questions on both scenarios. From what I could tell, my performance was 'SH' (Strongly Hinted).
Onsite 2 was a coding round with an interviewer from the US. The main question was challenging, relating to filesystem size calculation. I solved it using DFS. The interviewer asked many clarifying questions, such as how to handle cycles in the filesystem. For follow-ups, I discussed caching results for multiple queries on the same filesystem, and how to reduce space by only storing folder sizes, as file sizes had O(1) lookup. I also suggested using a visited set for cycles and considered Union-Find for multiple filesystems. However, I felt I overcomplicated the solution and might have missed a bug, resulting in a 'LNH' (Low Not Hire) performance.
Onsite 3, my second coding round, was truly the best for me. The interviewer, also from the US, was incredibly cool. The problem involved validating a string based on its length l, a maximum of k similar consecutive characters, and a given set of alphabets. I solved this with a stack in O(N) time and O(N) space, mentioning that an O(1) space optimization was possible. The interviewer actually helped me with the O(1) solution without me getting stuck, and I quickly coded it.
The follow-up was to count the number of valid strings under the same l, k, and alphabets constraints, but without being given an initial string s. I initially misunderstood and began discussing Monotonic Stack and DP, assuming s was still an input. When the interviewer clarified, I realized my mistake and quickly switched to a backtracking approach, explaining its complexity and implementation. The interviewer was very happy with my quick adaptation. I even suggested an optimized solution as time was running out. My performance here was 'H' (Hire) despite the initial misunderstanding.
I received positive feedback from HR and am now moving forward to Team Matching.
Interview Questions (5)
Describe a situation where I had to change direction or strategy midway through a project or task at my workplace.
Share an experience where my actions or behavior positively influenced my team.
Given a string s, an integer l, an integer k, and a set of alphabets. A string s is considered valid if it meets these criteria:
1. Its length is exactly l.
2. It does not contain more than k similar consecutive characters.
3. All characters in the string s are present in the given alphabets set.
Given an integer l, an integer k, and a set of alphabets (without string s). Count the total number of valid strings that can be formed, where each string must meet these criteria:
1. Its length is exactly l.
2. It does not contain more than k similar consecutive characters.
3. All characters in the string must be present in the given alphabets set.
Preparation Tips
I started preparing intensely since March 2024 and have solved over 1500+ questions on LeetCode.
Summary
I interviewed for an SDE 3 position at Google in Bengaluru, sharing detailed questions from multiple rounds. Despite my efforts, I was ultimately rejected due to negative feedback on one of the technical rounds.
Full Experience
Hi folks, I have around 3.5 years of experience. I gave my Google interviews in March. This community helped me immensely, and now I'm sharing my experience and the questions I was asked to give back.
Round 1 - Screening - DP
This round focused on Dynamic Programming.
Round 2 - Sliding Window
This was another technical round.
Round 3 - Linked List
This round involved implementing a secure linked list.
Round 4 - Googleyness
This round focused on behavioral aspects and my past experiences.
Round 5 - Graph BFS
The final technical round involved a graph problem using BFS.
Verdict
I received negative feedback for Round 2, indicating that I took hints during the problem-solving process. Consequently, I was rejected.
Interview Questions (6)
There are N + 1 squares in a linear fashion labeled 0 to N. A player starts from square 0. He has 'm' coins. He tosses all of them before proceeding. If all are heads, he jumps 2 steps or else he jumps 1 step. Find the number of different scenarios where the player can reach the last square.
There is necklace with 2xD diamonds and 2xR rubies. You need to cut the necklace 2 or fewer times to divide it among two people in such a way that both will have same number of diamonds and same number of rubies.
Implement a secure singly linked list. Each node should have a hash value which is computed based on the current node's data and the next node's hash value. Implement prepend, insert at given index and validate functionalities. Also given an array, convert it to a secure linked list.
Describe a situation where your manager had unreasonable demands. How did the product release go through? What were the learnings?
Describe a project where you had a lot of business impact?
Given a set of space stations, one can teleport from one space station to another instantaneously. There are some space station which are defective and you will get lost if you reach that station. Find the minimum number of teleportations required to move from one space station to another.
Preparation Tips
I leveraged the resources and insights provided by this community during my preparation, which proved beneficial in navigating the interview process.
Summary
I experienced a Google phone screen where I tackled a dynamic programming problem focused on finding the maximum nesting level for a given set of rectangles. After an initial brute-force attempt, I recognized the DP pattern, successfully implemented a memoized solution, and discussed its complexities.
Full Experience
I recently completed my Google phone screening interview for an L4 position. The interviewer presented me with an intriguing problem: I was given a list of rectangle dimensions, each as a [length, width] pair, and asked to determine the maximum possible nesting level. The concept of a 'level' was explained clearly: inserting a smaller rectangle into a larger one constitutes one level, and placing an even smaller rectangle inside that creates a second level, and so on. My first approach involved an iterative, brute-force solution with a couple of loops. However, during the dry run when the interviewer asked me to walk through an example, I immediately understood that this was a classic dynamic programming problem. I quickly pivoted, revised my code to incorporate memoization, and the interviewer seemed quite satisfied with my explanation of the time and space complexities of the optimized solution.
Interview Questions (1)
Given a list of pairs, where each pair [length, width] represents the dimensions of a rectangle. You need to find the maximum nesting level possible. A level is defined as follows: if you insert a small rectangle inside a large one, that counts as one level. If an even smaller rectangle is inserted inside the first small rectangle, it counts as level 2, and so forth.
Summary
I recently completed a 45-minute screening round for an SE-3 role at Google India. Despite missing a specific edge case, my logical approach and timely coding of a stream processing problem, similar to a configurable Top K, were well-received, and I was informed that I would be proceeding to the next interview rounds.
Full Experience
I had my screening round for the SE-3 role at Google around mid-January 2025. This 45-minute session focused on a coding challenge. The question involved efficiently finding a maximum or minimum number from a stream of incoming data, which also included a configurable 'Top K' variant. I chose a Priority Queue approach, which the interviewer seemed satisfied with. We delved into base cases, functional scenarios, and thoroughly discussed the time and space complexity of my solution. I successfully wrote the code in the shared document and also handled the bonus 'Top K' case using my existing Priority Queue strategy. Two days later, HR provided feedback. While they noted I missed a particular case, they acknowledged that my logic and code were correct, and I completed the task within the timeframe. They explicitly stated that I would be moving forward to the loop rounds, though I am currently awaiting further communication from them.
Interview Questions (1)
Design a data structure to process a continuous stream of numbers. The system should efficiently support operations to find either the maximum or minimum element observed in the stream so far. Additionally, consider an extension where the system needs to maintain and query the 'Top K' elements from the stream, where the value of K can be configured or changed dynamically.
Summary
I successfully interviewed for an L4 Software Development Engineer position at Google in Hyderabad, India, securing an offer after a series of phone screen, technical, and Googleyness rounds.
Full Experience
I applied for a position at Google through their careers page in the first week of November 2024. The very next day, I received an email from a Google recruiter requesting my resume, which I promptly sent. A couple of days later, the recruiter contacted me by phone to discuss my fit for Google and inquire about my availability for a phone screen. I requested three weeks to prepare.
Phone Screening [December 12, 2024]:
Initially scheduled for December 4th, my phone screen was postponed due to interviewer unavailability. The question was a relatively straightforward design problem involving a Priority Queue or TreeSet. I solved the problem with a small hint from the interviewer. No follow-up questions were asked. I then asked a few general questions, and the interview concluded. Within a couple of hours, the recruiter contacted me to inform me that the phone screen feedback was positive, and I would be moving on to the on-site (virtual) rounds. Verdict: Hire
A few days later, a different recruiter contacted me to schedule my on-site rounds, which I requested to be scheduled in the first week of January 2025.
Round 1 [January 6, 2025]:
I was asked a question similar to "Evaluate Expression," solvable using a stack. It was a variation of a common LeetCode problem. I addressed two follow-up questions, making necessary code adjustments. I completed everything within 40 minutes, performed dry runs with several examples, and explained the time and space complexities. The interviewer seemed pleased. The following day, the recruiter informed me that the feedback was extremely positive. Verdict: Strong Hire
Round 2 [January 7, 2025]:
This round focused on a graph problem, a variant of Dijkstra's algorithm. I coded the solution in 15 minutes, correcting a small bug pointed out by the interviewer. I was then asked a follow-up question, a modification of the initial problem. I coded the solution, performed a dry run, and explained the time and space complexities. The interviewer appeared satisfied. The next day, the recruiter contacted me again, stating that the feedback was very good. Verdict: Strong Hire
Round 3 [January 8, 2025]:
This was a rather unusual geometry question (I couldn't find a similar one on LeetCode). I solved it using BFS and explained the time and space complexities. While functional, the solution was suboptimal. The interviewer asked me to optimize it, and I proposed a DP solution, which was also suboptimal. With only 10 minutes remaining, the interviewer provided a hint, which enabled me to quickly devise and code the optimal solution. I ran out of time; the interview lasted approximately 50 minutes. The following day, the recruiter contacted me, saying the feedback was mixed. Verdict: Lean Hire
Googleyness & Leadership (G&L) Round [January 10, 2025]:
This round was quite relaxed. I felt over-prepared. The interviewer asked a few situational questions, after which I had the opportunity to ask general questions about Google's culture. The interview concluded within 20-25 minutes. Verdict: Strong Hire
January 13, 2025: The recruiter called to explain that my on-site feedback was positive and that I would be moving on to team matching.
January 15, 2025: I was contacted about a potential team match and asked about my availability for the following day.
Team Match [January 16, 2025]:
I had a team match with a Google Cloud team based in Hyderabad. The Hiring Manager (HM) described the team, their work, and their tech stack. He asked me about my current work. I liked the work; the product seemed interesting, and Hyderabad is my preferred location. I was happy with the team.
January 17, 2025: The recruiter called to inform me that the HM wanted to proceed with me for the position. I confirmed my interest in the team. The recruiter then requested additional details to prepare the offer packet for the Hiring Committee (HC).
January 21, 2025: The recruiter called to inform me that the HC had approved my packet, and we had a preliminary compensation discussion.
January 22, 2025: We had the final compensation discussion. After a brief negotiation, we finalized the offer, and the recruiter released the offer letter, which I signed the same day.
Interview Questions (1)
A coding problem similar to 'Evaluate Expression' which is typically solved using a stack. The problem involved handling several follow-up questions and required code adjustments.
Preparation Tips
I requested three weeks to prepare for the initial phone screen. After receiving positive feedback, I strategically scheduled my on-site rounds for the first week of January 2025, allowing myself additional time for thorough preparation. My LeetCode profile indicates I've solved 673 problems: 146 Easy, 437 Medium, and 90 Hard.
Summary
After a comprehensive and protracted interview process at Google for an L4 Software Engineer position, which included multiple coding and behavioral rounds, as well as additional technical assessments after an initial hold, I successfully secured and negotiated an offer.
Full Experience
My Google L4/SWE-III Interview Journey
I was initially contacted by a Google Recruiter on LinkedIn in late August 2024. Feeling that I needed more time to prepare, I requested a month's deferral, which was granted. This period allowed me to focus intensely on my preparation before starting the official interview process.
Phone Screening Round [30-09-2024]
The phone screening round featured a typical sliding window-based question with a couple of follow-ups, all of medium complexity. I clearly explained my approach, coded it efficiently (optimizing from O(2N) to O(N)), and performed a dry run with two examples, one specifically demonstrating the optimization's benefit. I completed everything within 30 minutes, and the interviewer seemed quite satisfied.
Following this, I didn't hear back for about a month despite sending follow-up emails. During this waiting period, I managed other interview processes and continued to practice 5-7 medium/hard problems daily, alongside LLD and HLD preparation.
Onsite Interviews:
Coding Round 1 [13/11/2024]
This round involved a geometry-based question, tagged as LeetCode Medium and Google-specific. I presented my approach, coded it, and then answered a few C++ related questions. After a small follow-up, I coded that too, finishing the interview in 30 minutes.
Coding Round 2 [14/11/2024]
Here, I was tasked with designing a class and its methods for Run-Length Encoding (RLE). I coded an initial O(N) solution and explained its complexity. When prompted for a better approach, I devised and coded a binary search-based solution. As time was running out, a follow-up was given, for which I only had to explain the approach without coding, describing it as an extension of my binary search solution. The interviewer seemed content.
Coding Round 3 [15/11/2024]
I encountered a LeetCode Hard problem in this round, which I had previously solved or seen a similar variant of, making me familiar with the optimal approach. I began by explaining the brute-force method, then transitioned to the optimal solution. After coding the optimal approach and doing a dry run, I was asked to generate test cases, including happy paths and edge cases. A second follow-up involved scaling the method for a very large use case, which caught me off guard. While I offered some ideas, the interviewer wasn't entirely satisfied and later clarified their expectations. Overall, this round was passable but not as strong as the others.
Googlyness [18/11/2024]
I spent the weekend preparing for this behavioral round by reviewing YouTube videos and LeetCode posts. I focused on structuring answers to common questions, like my most critical project and its challenges, using the STAR format. The round, led by a manager, involved standard questions with some follow-ups, and I felt it went well.
A week passed without hearing back. With other offers on the table, I proactively contacted my recruiter for an update. Soon after, I received positive feedback and was moved to the team matching phase. I had two team match calls, and fortunately, the second team and manager showed mutual interest, leading to my packet being submitted to the Hiring Committee.
However, after another week, I learned from my recruiter that the Hiring Committee had placed my packet on hold due to some gaps in my technical rounds. Despite my requests, specific details about which rounds or what the gaps were, or individual hire signals, were not provided. Consequently, two additional technical rounds were scheduled.
For these new rounds, I dedicated myself to solving 50-70 recently tagged Google questions on LeetCode.
Additional Round 1 [18/12/2024]
This round began with a graph-based question solvable by BFS or DFS, similar to LeetCode 200. I explained both algorithms and their complexities before coding the DFS version. The interviewer then presented a different problem, similar to LeetCode 127. As I started coding my approach, they asked about the A* algorithm. Unfamiliar with it, I received a brief explanation and was encouraged to learn more. A follow-up to the original problem led me to an O(N^2) solution. After discussing further, we settled on an optimized approach, which I dry-ran.
Additional Round 2 [18/12/2024]
I was given a modified CPU Scheduling problem. My initial brute-force solution prompted the interviewer to ask for optimization. After some effort, I arrived at and coded the optimal solution, followed by a dry run. The subsequent question was an extension, which I identified as a 'Binary Search on Answers' type problem. I coded this solution as well, explaining its time complexity, and the interviewer seemed satisfied.
Due to the holiday season, there was a significant delay. On January 7, 2025, I finally heard that the Hiring Committee had approved my packet for L4, but the position with my matched team was no longer available. This meant re-entering the team match phase. I had two more team match calls over the next three weeks, eventually securing a match with a team in Google Ads.
Compensation Discussion
Two days after my team was finalized, my recruiter contacted me for compensation discussions. I was presented with two options:
- Option 1: 35L base + 121K GSU + 15% bonus + standard Google perks
- Option 2: 37.6L base + 6L Joining Bonus + 101K GSU + 15% bonus + standard Google perks
I favored Option 2 for the higher joining bonus and attempted to negotiate further. The next day, I received a revised offer:
- Option 3: 37.6L base + 8L joining bonus + 98K GSU + 15% bonus + perks
This offer was satisfactory, and I accepted it, receiving the official offer letter on the same day.
Offer Date - 31-01-2025
My overall experience taught me that interviewing with Google demands immense patience and unwavering focus. Happy Coding!
Interview Questions (4)
Design a class with methods for Run-Length Encoding. Initially, an O(N) approach was discussed, followed by optimizing it using a binary search approach. A follow-up question was also given, requiring an explanation of the approach based on the binary search solution.
A graph-based question that could be solved using either Breadth-First Search (BFS) or Depth-First Search (DFS). I explained both approaches and their time complexities, then coded the DFS solution.
A question similar to LeetCode 127 (Word Ladder). I explained my approach and started coding. The interviewer then asked if I knew A* algorithm, which I was unfamiliar with. They explained A* and then gave a follow-up to the original problem, for which I provided an O(N^2) solution. After discussing other approaches, we finalized one, and I performed a dry run.
The first part was a modified CPU Scheduling problem. I initially proposed a brute-force solution and was then prompted to optimize it, eventually arriving at an optimal solution which I coded and dry-ran. The second part was an extension to this problem, which required mapping it to a 'Binary Search on Answers' type question. I coded this extended solution and explained its time complexity.
Preparation Tips
My Preparation Strategy
My preparation began in January 2024 with a New Year's resolution to solve one LeetCode question daily. I was moderately consistent, solving about 150 problems by late August. This initial phase helped me warm up and build momentum. When the Google recruiter reached out, I asked for a month to intensely prepare.
During that dedicated month, I focused on:
- Systematically solving every problem from Strivers SDE Sheet, topic by topic, and watching his accompanying videos.
- In the final week, I stopped solving new problems and concentrated on revising previously completed questions from the sheet, particularly those I struggled with initially.
Even during the month-long wait for phone screen results and while managing other interviews, I continued practicing 5-7 medium/hard problems daily, along with LLD (Low-Level Design) and HLD (High-Level Design) studies.
Before the Googlyness round, I reviewed YouTube videos and LeetCode posts, preparing answers for common behavioral questions (e.g., most critical project, challenges) using the STAR format.
After my packet was put on hold and additional technical rounds were scheduled, I specifically focused on solving 50-70 recently asked Google-tagged questions on LeetCode to fine-tune my skills for their specific problem patterns.
Summary
I completed a phone interview with Google for an L3 position, successfully clearing the technical round. However, despite being told I would proceed, the recruiter subsequently ghosted me, leaving the process unresolved.
Full Experience
I submitted an application to Google in November, and their recruiter reached out to me in early December. We discussed my areas of expertise and salary expectations. My phone interview, which was initially scheduled earlier, took place in mid-January.
The interview included a challenging graph-based question. I proposed an initial brute-force approach, which then led to discussions about optimizing with a priority queue and even precomputing priority queues for each node to speed up adjacent node selection. While I wasn't able to fully discuss time complexity or further refinements due to time constraints, I felt I performed reasonably well.
Shortly after the interview, the recruiter followed up, stating that the result would be declared in 2-3 days. Four days later, HR confirmed that I had cleared the phone screen and a different recruiter would contact me the following week to explain the procedure and answer any questions. However, since then, I have received no further communication. Despite sending follow-up emails, I've been continuously told "we will get back to you tomorrow," which has never materialized. I've been effectively ghosted.
Interview Questions (1)
Given n routers placed on a Cartesian plane, along with a source and a destination vertex, the task is to determine whether it is possible to reach the destination.
The constraints for exploration are:
- Only adjacent vertices can be explored.
- A vertex is considered adjacent if it has the minimum distance from the current vertex AND remains within a given threshold.
- Once a vertex is visited, the previously visited node becomes inactive and can no longer be used in subsequent steps.
The goal is to find if a path exists from the source to the destination under these specific constraints.
Summary
I recently interviewed for an L5 Software Engineer role at Google and successfully received an offer. Despite facing challenging rounds, including two with 'Lean Hire' verdicts, I managed to convince the Hiring Committee and secure the position.
Full Experience
Hi everyone! I recently interviewed for an L5 Software Engineer role at Google and wanted to share my experience. My professional background includes 5.5 years of experience, primarily as an entrepreneur, having graduated from a Tier 1 college.
Coding 1: I spent almost 30 minutes understanding the problem and clarifying my approach with the interviewer. This initial time investment helped immensely, as I took another 10 minutes to code and achieved a perfectly working solution covering all edge cases on my first attempt. My self-verdict for this round was 'Hire'.
Coding 2: I had a rather strange experience during this interview. The question itself was an easy one, but the interviewer seemed to want me to solve it exceptionally quickly. Whenever I paused to think, they would start giving hints and urging me to proceed. I was able to solve the question and its follow-ups, but the feedback noted that I only solved the problem after receiving hints. My self-verdict was 'Lean Hire'.
System Design: I started this discussion well and was able to address the functional requirements within 20 minutes. Although I asked the interviewer on which aspects I should dive deeper, I didn't get any clear signals. Consequently, I ended up making many self-decisions and hopped between topics a bit, which wasted some time until I finally concluded my solution. My self-verdict was 'Lean Hire'.
GnL (Googliness & Leadership): This round went really well. I followed the STAR format diligently, answering every question with concrete examples. I tried to keep my answers diplomatic yet actionable. The interviewer appeared very engaged and interested in my stories, ideas, and thoughts. My self-verdict was 'Strong Hire'.
Team Match Rounds: I had more or less similar experiences across all three team match rounds. These discussions primarily revolved around my background, what the teams do, and what they expect from a candidate. An important tip I learned is to try and link any of your past experiences with the team's future projects. In my opinion, people prefer candidates who have already solved similar problems, not just those who can solve them.
Additional System Design Round: I started this interview very well and managed to reach an ideal solution within 30 minutes. Seeing this, the interviewer modified the problem statement and asked me to redesign it. We engaged in a great discussion, arguing various approaches, and finally, they seemed convinced with my approach. My self-verdict was 'Strong Hire'.
Overall, I was able to convince the Hiring Committee with my packet, despite having two 'Lean Hire' verdicts. I received the offer letter two days ago! 🎉
Interview Questions (4)
You are given a dictionary, and a stream of words. The words in the stream are of varying lengths. Encode the words in the stream based on their frequencies using Huffman Coding algorithm. The encoded stream should be as short as possible. The dictionary size is fixed, and the words in the stream are always from the dictionary.
Given an organizational structure as a list of (employee, manager) pairs, where manager is the direct manager of employee. Each employee has a unique ID (integer). There's one root manager (has no manager). Implement a function updateManager(employeeId, newManagerId) that updates the manager of employeeId to newManagerId and returns true if the update is successful, false otherwise. Constraints: An employee cannot become their own manager. An employee cannot become a manager of their direct or indirect report. The organizational structure must remain a tree (no cycles). What's the time and space complexity?
Design a distributed cache optimized for a given task (details of the task were presented on screen).
Design a TikTok-style news feed similar to Google News.
Preparation Tips
For preparation, an important tip is to try and link any of your past experiences with the team's future projects. People don't prefer candidates who can merely solve problems; rather, they prefer those who have already solved such problems in their past work experience.
Summary
I interviewed for an L4 position at Google, completing a phone screening and four onsite rounds over a few months. I felt I performed strongly in several technical and behavioral rounds and am currently awaiting the final outcome.
Full Experience
I have 4.2 years of experience in a product-based company. I received a message on LinkedIn from a Google recruiter, and as I was actively looking for opportunities, I scheduled my phone screening round for the following week.
Nov 1st week: Phone Screening Round
I don't remember the exact question, but it was an array question similar to this LeetCode Discuss post. I was able to solve the question with an optimal solution, and later received positive feedback from HR.
After this, there was a break for a soft team alignment. For those unfamiliar, this is a process where my candidature was circulated throughout Google to see if any Hiring Manager was interested in my profile. This is a one-way process; at least one HM needs to show interest for the onsite rounds to be scheduled. After one and a half months, I received a mail to schedule the onsite rounds. Trust me, there were times I almost gave up on Google! A week after receiving the mail, I scheduled my onsite rounds.
Dec End: Round 1
The question was: You are given an input string, for example add(5, mul(2, pow(5,2))), and you have to evaluate it. This was just a plain string with operators such as add (addition), mul (multiplication), pow (power), sub (subtraction), and div (division). I was able to come up with an approach, but could only code half of the solution due to time constraints. The feedback was not great for this round.
Dec end: Round 2
The question involved creating two functions:
InsertRange(int start, int end): This function takes two integer arguments,startandend, to create intervals wherestartis inclusive andendis exclusive.Query(int point): This function takes an integer as input and returns a boolean, indicating if the particular point is present in any of the created intervals.
Example:
- Insert:
[2, 3),[2, 5),[9, 13). The final merged intervals should be{[2,5), [9, 13)}. - Query:
0should returnfalse,2should returntrue,10should returntrue.
I was able to solve and code the solution within time, including follow-up questions. I'm guessing I got a Strong Hire for this one.
Jan start 2025: G&L round
This round consisted of general behavioral questions. I'm guessing I received a Hire or Strong Hire for this round.
Jan start 2025: Round 3 (Rescheduled)
This was a Dynamic Programming question, specifically finding the length of the longest increasing subsequence but with a tweak. I was able to solve and code the solution within time and also handled the follow-up question. I'm guessing a Strong Hire for this as well.
I hope this post helps others. Thanks and All the best!
Interview Questions (2)
Given an input string, for example add(5, mul(2, pow(5,2))), you have to evaluate the string. This is just a plain string. The available operators are:
add: additionmul: multiplicationpow: powersub: subtractiondiv: division
Create two functions:
InsertRange(int start, int end): This function takes two integer arguments,startandend. When called, it should create or merge intervals such thatstartis inclusive andendis exclusive.Query(int point): This function takes an integer as input and returns a boolean, indicating whether the given point is present within any of the currently stored intervals.
Example:
Insert operations:
InsertRange(2, 3)InsertRange(2, 5)InsertRange(9, 13)
The final merged intervals should be {[2,5), [9, 13)}.
Query operations:
Query(0)should returnfalseQuery(2)should returntrueQuery(10)should returntrue
Summary
I recently had a phone screen interview with Google for the SWE3 position in Bangalore. During the interview, I was presented with a challenging string manipulation problem involving index matching.
Full Experience
I had a phone screen interview with Google for the SWE3 role in Bangalore. The interviewer presented a rather interesting problem centered around string processing and index matching. The problem involved working with a large string representing pi and finding specific indices that matched their corresponding digits in a 1-based indexing system, which required careful handling of multi-digit indices.
Interview Questions (1)
You are given pi in form of a string e.g. pi = "314159265359". You have to return a list of indexes where i = pi[i].
- Consider 1 based indexes.
- For multi digit indexes this is the matching criteria:
i = 456andpi[454] = '4' pi[455] = '5' pi[456] = '6'. - String length can go up to 10^6.
Summary
I recently interviewed for an L4 position at Google. Despite successfully solving and coding all technical problems, and receiving positive feedback on most rounds, I was ultimately rejected. This was my best interview performance to date, making the outcome quite disheartening.
Full Experience
I went through a comprehensive interview process for an L4 role at Google. The overall experience was quite intense, encompassing several technical rounds, a system design round, and a behavioral interview. I dedicated three months to preparation, and felt confident in my ability to tackle the problems.
Mock Interview
This was my first round, which went quite well. I was given a problem involving a binary search tree. Verdict: Strong Hire.
Screening Round
This round involved two coding questions. I was able to come up with solutions for both and implemented them, receiving positive feedback from the interviewer. Verdict: Strong Hire.
Onsite 1 (Coding / System Design Elements)
This round focused on processing log entries to detect RPC timeouts. I initially struggled a bit with my approach but eventually landed on a working solution. Verdict: Hire.
Onsite 2 (Coding / Backtracking)
This was a complex combinatorial problem. I proposed a backtracking solution and implemented some pruning. However, the interviewer seemed unconvinced, asking why backtracking would work, which felt like a basic question about exhaustive search. Verdict: Not Hire. I had a feeling about this round.
Onsite 3 (System Design)
This round was about designing an ad server. I provided a solution that the interviewer confirmed was fine, but I still received a 'Not Hire' verdict. This came as a complete shock to me, as I believed I had coded it properly with no syntax errors, and the interviewer's feedback was positive. Verdict: Not Hire. This round's outcome was particularly surprising and disappointing.
Googlyness and Leadership
This was a standard behavioral round where I discussed how I handle various workplace situations, interactions with managers and juniors, and stressful scenarios. Verdict: Hire.
Overall, I'm not feeling good about the outcome. I put in a lot of effort, and this was genuinely my strongest interview performance. Solving all the problems and getting positive feedback on most only to be rejected is hard to process. Especially the Onsite 3 verdict, which I still can't comprehend.
Interview Questions (8)
Given a Binary Search Tree (BST) and a numerical range [L, R], find and return all keys (node values) that fall within this inclusive range.
Implement an iterative approach to find all keys that lie within a given range [L, R] in a Binary Search Tree (BST). This is a follow-up to the recursive solution.
Given an array of integers arr, you can jump from an index i to arr[arr[i]]. The goal is to find the minimum number of jumps (cost) required to reach the last index, n-1, starting from index 0.
You are given an array of integers representing the heights of fences. You have a paintbrush that can make horizontal and vertical strokes; a single stroke implies not lifting the brush. Find the minimum number of strokes required to paint all fences. Assume a fence of height 0 breaks the array into independent parts.
Design an algorithm to process a stream of RPC log entries in an offline setting. Each RPC call generates two entries: one when it starts and one when it finishes. The objective is to efficiently identify, as soon as possible, any RPC that has exceeded a predefined time threshold (i.e., timed out). The start and end times are not unique, meaning multiple requests can occur at the same timestamp.
Given 12 tiles, each possessing both a color and a number, determine if it's possible to form exactly 4 'winning hands'. A single winning hand requires 3 tiles and satisfies one of two conditions: 1) all three tiles have identical color and number, or 2) all three tiles have the same color and their numbers are consecutive (e.g., 1, 2, 3).
Design an ad server that manages a collection of ads, each with content and an associated score (higher score is better). The server must support insertAd(ad) and serveAd(). The serveAd() function should always deliver the ad with the highest current score, with the crucial constraint that the same ad cannot be served consecutively.
Extend the previous ad server design. Now, each ad also includes a 'delay' value (e.g., 5). After an ad is served, it cannot be served again until delay other ads have been served. This generalizes the non-consecutive constraint (which can be seen as a delay of 1).
Preparation Tips
I devoted a full three months to preparing for these interviews. My strategy involved extensive practice across data structures, algorithms, and system design. I ensured I understood the core concepts thoroughly and practiced coding solutions for a wide range of problems. During the actual interviews, I was able to come up with solutions for all questions, code them, and confidently dry run them to demonstrate correctness.
Summary
I recently completed an on-campus SDE interview process at Google, which involved three rigorous technical rounds. The interviews focused on my problem-solving skills across data structures, algorithms, and a behavioral assessment.
Full Experience
First Round
The first round kicked off with a challenging algorithmic problem. I was presented with a scenario involving N passengers, each with a specific weight and value, and a ship with a maximum capacity C. My task was to determine the maximum total value of passengers that could be boarded without exceeding the ship's capacity. Initially, all passengers had the same value, which simplified the problem. However, a follow-up quickly introduced the complexity where values could differ for each passenger, pushing me towards a knapsack-type solution.
Following the technical problem, the interviewer transitioned to a behavioral question: 'Tell me about a time when you were leading a project and had a conflict of opinion with your teammate?' I shared an experience detailing how I navigated such a situation, focusing on communication and collaboration.
Second Round
The second round was heavily focused on graph theory. The interviewer described a graph problem where I was given a source node, a destination node, and a 'corrupted' node. The initial task was to determine if it was possible to reach the destination from the source, avoiding the corrupted node. This was followed by a series of progressively complex follow-ups.
The first follow-up required me to return an array of minimum distances from the source node to all other reachable nodes. Then, the problem introduced a 'virality' concept: nodes within a certain distance ('virality distance') from any corrupted node would also become corrupted. I had to re-evaluate reachability under this new condition. The final and most challenging follow-up extended this 'virality' concept to include multiple corrupted nodes, further complicating the pathfinding logic.
Third Round
The final round presented a dynamic programming or combinatorial problem. I was given the total number of houses, along with the predefined colors for the first and last houses. The colors could range from 1 to K. The core task was to calculate the number of unique ways to paint the remaining n-2 houses, adhering to the constraint that no two adjacent houses could share the same color. This round tested my ability to formulate a recursive solution with memoization or a bottom-up DP approach.
Interview Questions (6)
was there a time when you were leading a project and had conflict of opinion with your teammate?
A graph, source node, destination node, corrupted node will be given. Return whether you can reach the destination node from the source node.
Return array of minimum distances from the source node to all other nodes.
There will be a variable virality, nodes which are in range of virality distance from corrupted nodes will also be corrupted. Now return the same.
There can be multiple corrupted nodes. Now return the same.
number of houses, color of first house, color of last house will be given. Colors can be in the range of [1,K]. Number of combinations you can paint the other n-2 houses such that no two adjacent houses will have the same color.
Summary
I interviewed for a Software Engineer (L3) role at Google, India. After successfully clearing the screening round, I proceeded to onsite interviews. Although I performed strongly in several technical and behavioral rounds, I struggled in one and ultimately my application was rejected after reaching the team-matching phase.
Full Experience
L3 Interview Experience
On September 18th, a Google recruiter reached out to me after reviewing my LinkedIn profile, suggesting I might be a fit for an L3 or L4 position. They ultimately selected me for an L3 role and scheduled my screening interview. All rounds were 45 minutes long.
Screening Interview (September 26th)
I was asked a tree-based problem focused on determining the minimum cost required to remove all terminal nodes from the root. I managed to solve it, though not optimally. About a month later, the recruiter informed me that I had passed the screening round and would proceed to the onsite interviews. I requested 15 days for further preparation. The onsite interviews were scheduled over two days: two rounds on November 15th and two rounds on November 26th.
Onsite Interviews
Round 1 (November 15th)
The interviewer joined 20 minutes late. The question involved determining the rank of players based on the results of a series of games, given 'n' players and multiple matches between pairs. I struggled in this round and couldn't arrive at the correct solution. The feedback was marked as 'No Hire' or 'Lean Hire.'
Round 2 (November 15th)
This round followed immediately after the first, with only a 5-minute break. It was based on the line sweep algorithm with a follow-up involving binary search, very similar to the Zero Array Transformation problem. I successfully coded the solution and answered the follow-up question, earning a 'Strong Hire.'
Round 3 (Googliness, November 26th)
This was a behavioral round, similar to what I had prepared for using Jeff H. Sipe's YouTube videos. I felt the round went well, and the feedback was 'Hire.'
Round 4 (November 26th)
The question revolved around dice games, where dice had equal sides but different values on each side. I needed to determine how many times Player 1 won. I proposed solutions with complexities of O(N^2), O(N log N), and O(N), coded them up, and addressed the follow-up question within 30 minutes. This allowed the interviewer to ask a modified version of the question, for which I needed a hint. Afterward, I successfully devised the approach and dry-ran the solution. This round was also marked as 'Strong Hire.'
Post-Onsite Process
The next day, my recruiter informed me that while some rounds were strong, overall feedback placed me just above the borderline. As a result, I was moved to the team-matching phase before the Hiring Committee (HC) phase.
A team-fit call was scheduled for November 28th but was postponed twice: first to December 2nd and then to December 4th. On December 3rd, my recruiter canceled the team-fit call altogether.
On December 4th, I was officially informed that my application had been rejected. I was told I could reapply after one year.
Interview Questions (5)
I was asked a tree-based problem related to determining the minimum cost required to remove all terminal nodes from the root. The exact cost function was not explicitly defined but implied an optimization problem on a tree structure.
Given 'n' players and results from a series of matches between pairs of players, the problem was to determine the rank of players based on these game outcomes.
This was a standard behavioral round designed to assess 'Googliness' and cultural fit.
The question involved a dice game where dice had equal sides but different values on each side. The goal was to determine how many times Player 1 would win against another player.
Preparation Tips
I requested 15 days for further preparation for the onsite interviews. For the behavioral round (Googliness), I prepared using Jeff H. Sipe's YouTube videos.
Summary
I successfully interviewed for an L4 position at Google, navigating through several challenging technical rounds focusing on algorithms, data structures, and system design, ultimately receiving an offer and joining the Google Hyderabad office.
Full Experience
My interview experience for an L4 position at Google involved several technical rounds. The preliminary screening tested my graph traversal skills with a unique message propagation problem. Round 1 focused on efficient IP address lookups. Round 2 delved into validating molecular structures, requiring careful handling of atom bonds and connectivity. The third round was a classic problem about finding the largest subsequence of digits. Finally, an additional HC round presented a challenging problem related to generating password attack lists from partial keylogger data. I received an offer and have since joined the Google Hyderabad team.
Interview Questions (5)
Let's define a kind of message called "Broadcast & Shut Down." When a router receives this message, it broadcasts the same message to all other routers within its wireless range. Then, that router shuts down, and can no longer send or receive messages.
For example, Router A is at (0, 0); Router B is at (0, 8); Router C is at (0, 17); Router D is at (11, 0). If the wireless range is 10, when Router A sends a message, it could first reach B; the message from Router B would further reach Router C but Router D would never receive this message.
Given a list of routers' locations (their names and the corresponding 2D coordinates), a source router, a destination router, and the wireless range, tell me whether a message from the source router can reach the destination router. Write a method / function with appropriate input and output arguments.
We have a file with the following format each line: startIP, endIP, cityName.
Question: Write a function that takes as input an IP address and outputs its associated cityName.
Example:
File format:
startIP, endIP, cityName
1.0.1.1, 1.0.1.10, NYC
1.0.1.20, 1.0.1.30, SF
...
If the input is 1.0.1.9, the output should be NYC.
Write code for the function.
We define an organic molecule by a list of atoms, and a list of bonds between any two of them. For example, the following formaldehyde molecule:
H
|
H-C=O
is represented as:
atoms: {1: 'C', 2: 'H', 3: 'H', 4: 'O'}
bonds: [[1, 2], [1, 3], [1, 4], [1, 4]]
The input does not have to be strictly in this format, as long as it delivers the information.
Given an input representing a molecule consisting only of Carbon, Oxygen and Hydrogen atoms, determine if it's valid.
A molecule is valid if every atom has the required number of bonds:
C atoms require exactly 4 bonds
O atoms require exactly 2 bonds
H atoms require exactly 1 bond
FOLLOW UP QUESTION:
We assume that each input represents one molecule. Multiple, disconnected molecules are considered invalid. Consider the following example:
O=C=O H-H
which would represented as
atoms: {1: 'C', 2: 'O', 3: 'O', 4: 'H', 5: 'H'}
bonds: [[1, 2], [1, 2], [1, 3], [1, 3], [4, 5]]
This input is invalid because it consists of 2 separate molecules. How would you modify your program to detect this situation?
Given a sequence S of N digits, find a subsequence of K digits such that the number formed by these K digits (in order) is the largest.
S = 4902, K = 2, answer = 92
S = 4902, K = 3, answer = 902
S = 142857, K = 1, answer = 8
S = 142857, K = 2, answer = 87
S = 142857, K = 4, answer = 4857
Generate brute force password attack list from "bad" keylogger and keyword list.
Imagine that you have a "bad" or "weak" keylogger which only has a counter (map) of each key and the number of times it was pressed in the password, unordered.
For instance, it might be a camera pointed at the keyboard, and you can't quite tell the order of the keys. So something like this:
{'a': 4, 'c': 1, 'e': 1, '1': 1}
Your goal, as an elite hacker, is to generate a list of possible passwords for a brute force attack.
Summary
I recently interviewed for an L4 Software Engineer role at Google in the USA. The process involved multiple coding rounds, an OOP design interview, and a behavioral round. Despite some strong performances, I was ultimately rejected after being considered for a downlevel, as there was no L3 headcount available in my area.
Full Experience
Hello LeetCode Community,
I'm here to share my recent experience interviewing for an L4 role at Google. Here’s a breakdown of my interview rounds, how they went, and some reflections on the process. I initially didn't know the outcome and was expecting a downlevel or outright rejection.
Interview 1
Feedback:
SHThis interview started with a simple trie problem, which was then expanded to include an additional data structure in the second part. It went really well; the interviewer even mentioned they were impressed with my approach! I was able to solve both parts optimally and felt I showcased my problem-solving skills effectively. We finished the coding portion a bit early, so I had some extra time to ask the interviewer about his experience working at Google.
Interview 2
Feedback:
H / LHThis was an OOP-style interview focused on designing a class with specific methods and data structures optimized for time complexity. It was a mix between InsertDeleteGetRandomO1 and LRU Cache. I felt confident as I worked through it, although I did initially miss a minor detail in the problem statement, which led to a bit of over-optimization. Luckily, the interviewer seemed okay with it and let me continue.
Interview 3
Feedback:
LNH / NHThis interview featured an array problem I hadn't encountered before. It took me a while to fully understand the requirements due to some unique twists that made it difficult to categorize. I quickly coded a brute-force solution but struggled to arrive at the optimal approach without guidance from the interviewer. I managed to code a basic version of the optimal solution just in time, though I missed a few edge cases. This felt like my weakest performance and might affect my overall outcome.
Interview 4
Feedback:
H / SHA standard behavioral interview covering questions about my experiences, teamwork, and problem-solving approach. Overall it felt like a good conversation, but I couldn't get much signal from the interviewer as they were pretty neutral the entire time. Still felt like I performed decently though.
Final Thoughts:
The experience was a rollercoaster of ups and downs, with more to come as I still didn't know my result. For those going through the process now, I’d recommend staying calm, asking clarifying questions early, and being mindful of time constraints. Even if you encounter an unfamiliar question, focus on explaining your approach and problem-solving skills to the interviewer. Don't get lost in implementing complexities that you can abstract away and implement later if you have time.
Thanks for reading, and best of luck to everyone on their own interview journeys!
UPDATE 1
I was contacted by my recruiter and told that I would need to do another coding round to get more signal. I was really hoping this wouldn't mean a downlevel. I planned to post the results of that round, as well as the overall result once I got it.
UPDATE 2
I wrapped up the extra round, and I'm still waiting on overall feedback from the recruiter. This interview definitely went better than round 3, but not well enough to warrant a Strong Hire in my opinion. The question was a backtracking problem, with quite a few moving parts. Overall, I'd give myself a
H / LH.UPDATE 3
I was downleveled. Ultimately, it was a rejection since there is no L3 headcount in my area. GG, I will try next time.
Interview Questions (4)
The interview started with a simple trie problem. In the second part, the problem was expanded to include an additional data structure, requiring further optimization or integration.
This OOP-style interview focused on designing a class with specific methods and data structures, optimized for time complexity. The problem was described as a mix between the concepts found in LeetCode's 'Insert Delete GetRandom O(1)' and 'LRU Cache' problems.
Standard behavioral questions covering past experiences, teamwork scenarios, and problem-solving approaches.
An additional coding round featured a backtracking problem with quite a few moving parts, suggesting a multi-faceted or intricate problem statement.
Summary
I had a phone screen with Google for an L4 position and unfortunately, I was rejected. The interview focused on designing a custom data structure for a string-based binary tree and a follow-up to find the Nth character.
Full Experience
I recently had a phone screen interview with Google for an L4 position. The interviewer presented a rather unique problem involving a string broken into multiple substrings, represented as a binary tree. Each external node contained a string and a data field, while internal nodes held a numerical value which was the sum of its children's data fields. For instance, if the left child had a data field of 5 and the right child 7, the internal node would show 12. There was an example provided, showing how 'APPLEPIEBANANA' could be structured this way. My primary task was to design a data structure to represent this tree. I opted to create a base Node class, with InternalNode and ExternalNode inheriting from it. The interviewer seemed content with my approach. As a follow-up, I was asked to find the Nth character in the complete string. For this, I implemented a recursive function that navigated through the tree, using a count variable, allowing me to solve it in O(height of tree) time. Despite my efforts, I received a rejection.
Interview Questions (2)
A string can be broken into multiple strings and represented as a binary tree where each external node contains a string and a data field and each internal node in the tree contains a numerical value that is the sum of the data fields of its left and right child nodes. For example, if the left child has a data field of 5 and the right child has a data field of 7, the internal node would contain the sum of these values, 12.
Example: 
So, here the complete string would be APPLEPIEBANANA
Question: Design a data structure that could represent the above tree.
Follow up: Find the Nth character in the string represented by the tree.
Summary
I interviewed for an Application Engineer Intern position at Google, successfully navigating a DSA round with two specific tree problems and a System Design round focused on designing an e-commerce website. Despite my efforts, I was ultimately not selected for the role.
Full Experience
My interview process for the Application Engineer Intern role at Google began with a resume shortlisting. The first round started with my introduction, followed by two DSA questions. The first problem required me to flatten an n-ary tree, and the second involved performing a preorder traversal of a tree where nodes had custom pointers for parent, right sibling, and left child. I managed to answer both of these questions correctly, which led to my selection for the next round. The second round was a 50-minute System Design interview, where I was tasked with designing an e-commerce website. Despite my performance in these rounds, I was ultimately not selected for the position.
Interview Questions (3)
I was asked to flatten an n-ary tree.
I was given a tree where nodes had pointers for parent, right sibling, and left child, and I needed to perform a preorder traversal.
In the System Design round, I was tasked with designing an entire e-commerce website.
Summary
I experienced three rounds of interviews for a Software Engineer New Grad position at Google, covering technical skills and Googleyness. I felt some rounds went better than others, and I am currently awaiting the final results.
Full Experience
Round 1 (Tech + Googleyness)
The first round began with introductions, though the interviewer joined a bit late. For the coding segment, I was given a problem involving a large array of coordinates, essentially a matrix, where I needed to find the maximum area among all possible rectangles. I initially approached it with a brute-force solution, which I coded. As I was contemplating further, the interviewer offered some hints, guiding me towards an optimal solution which I then discussed and implemented. Following the technical part, we moved to Googleyness. I was asked about a scenario where a teammate takes all the credit for a team project despite everyone contributing. I shared my perspective, and a follow-up question explored what I would do if the same situation occurred again. I felt the interviewer wasn't entirely satisfied, and honestly, she wasn't the friendliest. This round left me feeling somewhat disheartened.
Round 2 (Tech only)
For this round, I truly gave my best. The coding question initially seemed confusing, so I took the initiative to ask several clarifying questions. We discussed the problem in detail, step by step. The interviewer first asked me to outline my approach as sentences, then we delved into the time complexities of each step before I proceeded to code. I found this interviewer to be very friendly and supportive. He kindly answered my questions at the end and even apologized for extending the interview time. My immediate assessment was that I performed very well in this round, likely a hire.
Interim and Round 3 Scheduling
A week later, I received a call from my recruiter who provided feedback on my previous rounds. He informed me that they would like to schedule a third round and emphasized the importance of performing well to advance my candidacy to leadership. This news made me a bit tense, as I knew I couldn't afford to make any mistakes in the upcoming round.
Round 3 (Tech + Googleyness)
This final round was rescheduled over four times due to a festival period before finally being set with a US-based panel. Initially, I was a bit worried about interviewing with someone from the US, but I quickly gathered my confidence. The interviewer started with a warm-up question asking for the depth of a binary tree. The main technical question involved trains, tickets, and the mechanics of people onboarding and offboarding, which I recognized as a variation of a range queries problem. For the Googleyness portion, the interviewer initially asked the same question as in my first round. Upon realizing this, he switched to other behavioral questions, such as how I would integrate myself or someone else into a team that is difficult to get along with, and what I would do if multiple people approached me for help or advice simultaneously, along with a follow-up. This interviewer was very calm and friendly. He seemed quite satisfied with my ability to progress from a brute-force approach to an optimized solution. My verdict for this round was a strong hire.
Outcome
The feedback and the additional preparation time I received after the second round were incredibly helpful for both the technical and behavioral aspects of the interviews. I am now eagerly awaiting the final mail and hoping for a positive outcome!
Interview Questions (5)
Given a large array of coordinates (i.e., a matrix), find the maximum area among all possible rectangles. I started with a brute-force approach, then discussed the optimal solution.
What would I do if a teammate takes all the credit for a team project during a presentation when everyone contributed? The interviewer asked a follow-up question: What would I do if he does the same again next time?
Find the depth of a binary tree.
How do I try to put myself or someone else into a team which is hard to get along with?
What will I do if multiple people approach me for help or advice at the same time? A follow-up question was also asked for this scenario.
Preparation Tips
The specific feedback I received after my second interview, coupled with the extra time I had before the third round, was instrumental. This allowed me to focus my preparation effectively, addressing both technical problem-solving skills and refining my responses for behavioral questions, especially those related to Googleyness.
Summary
I interviewed for a Software Engineer L3 role at Google India. Despite initial recruiter delays and a challenging "Googlyness" round, my technical interviews went well, and I received a "go ahead" on my profile.
Full Experience
I was initially contacted by a Google recruiter in early March regarding a Software Engineer L3 role in India. The recruiter rescheduled calls multiple times and was unresponsive to emails, which was quite frustrating. Eventually, in late April, the recruiter re-engaged and promptly scheduled a call. After discussing my background and compensation expectations, I was informed about the L3 role and the interview process. Feeling unprepared and lacking confidence, I requested a three-week preparation period before proceeding with the interviews.
Round - 0: Technical Screening
This round took place in mid-May. The problem was similar to the Maximal Square problem on LeetCode, but with an additional constraint. I first proposed a bruteforce approach and then, on my own, landed on a DP solution. After coding, the interviewer asked me to find a bug; I quickly identified an index-related issue and explained my corrected code. The interviewer seemed satisfied. I rated my performance 4.5/5.Following this, the recruiter ghosted me for about a month before scheduling the onsite interviews in June.
Onsite - 1: Technical Interview
The question in this round was related to finding the length of increasing subsequences, again with additional constraints that I cannot recall precisely. I immediately suggested a DP solution and was then prompted to optimize it further. After some thought, I proposed and coded a Hashmap-based approach. As a follow-up, the interviewer modified the subsequence constraints, which I was able to handle by making minor adjustments to my existing solution. The interviewer appeared satisfied. I rated this round 4.9/5.Onsite - 2: Technical Interview
The interviewer, a Principal SDE, introduced himself, and I spent about 10 minutes introducing myself. He described the problem verbally rather than providing a written prompt. The task involved an n * n grid, much like a mobile lock screen, and I needed to find the number of possible patterns under certain constraints. I struggled initially, feeling the pressure of the clock, and found myself contemplating a 3D DP approach, grappling with its states. The interviewer intervened, asking me to try solving it without DP first. While explaining my thought process, he posed many "why" questions. He then turned off his camera, citing network issues, which left me uncertain if I was on the right track. Eventually, I arrived at a backtracking approach. With only 8 minutes remaining, he asked me to code it quickly. I implemented the solution in a single pass. I wasn't entirely sure if my solution or code was correct, but I knew it could be optimized with memoization and bitmasking. The interviewer didn't allow a dry run and instead immediately asked about complexities before concluding the call. I later realized my code was correct and regretted not suggesting the optimizations. I rated this round 3/5.Onsite - 3: Technical Interview
The question involved finding the farthest distance with some constraints. I quickly proposed a multi-source BFS approach with an O(V + E) complexity. After explaining it in detail, the interviewer questioned my complexity analysis, suggesting it was O(V). I initially agreed, but she then corrected herself, confirming O(V + E) was correct. "It was at this moment I knew I f...d up." She then delved into many questions about complexities, asking about dense/sparse graphs and various input representations (list of edges, adjacency matrix/list). After carefully answering, I coded the solution. She then tweaked the problem as a follow-up, and I modified my code accordingly. Finally, she introduced directed edges with weights, for which I took some time and proposed Dijkstra's Algorithm, answering many "why" questions about my approach. She seemed to agree, though I wasn't entirely sure of her satisfaction. I couldn't code this part due to time constraints. When I asked her what she liked most about Google, she simply replied, "Food." I rated this round "idk/5."Googlyness Round
This round consisted of standard behavioral questions. However, the interviewer didn't seem satisfied with any of my answers. He probed deeply into the Software Development Life Cycle (SDLC), an area where I am not very proficient. I struggled to provide satisfactory answers and even admitted, "I don't know," to one of his questions. My personal rating: "I bombed it/5."The next day, the recruiter called to inform me, "Except Googlyness, other technical rounds went well, and we received a go ahead on your profile. Congrats!"
Interview Questions (5)
The question involved finding the length of increasing subsequences with some additional constraints. I was asked to optimize my initial DP solution. A follow-up modified the subsequence constraints, which also needed to be solved.
Given an n x n grid resembling a mobile lock screen, the task was to find how many unique patterns are possible with certain constraints. The problem required counting valid paths on the grid.
The initial problem was to find the farthest distance in a graph under specific constraints. A follow-up modified the problem to include directed edges with weights, requiring a different approach.
Standard behavioral questions were asked, with a deep dive into the Software Development Life Cycle (SDLC).
Preparation Tips
I wasn't initially prepared for the interviews, so I requested and utilized a three-week preparation period. Specific details of my preparation methods were not mentioned in the post.
Summary
I recently interviewed for an L3 role at Google in the USA, navigating through a phone screen, a Google & Leadership round, and three challenging technical rounds.
Full Experience
My L3 interview journey at Google in the USA began with a phone screen, followed by an onsite component which included a dedicated Google & Leadership round and three distinct technical coding sessions. Each stage presented unique challenges, ranging from in-depth behavioral inquiries to complex algorithmic problem-solving. It was a comprehensive evaluation of my skills and approach.
Interview Questions (9)
Tell me about a time when your manager set reasonable demands. Follow up asked for a situation with unreasonable demands.
Tell me about one of the biggest accomplishments in your career so far.
Tell me about a time when you faced a challenging situation at work.
How do you manage multiple priorities, do you like to be in a place where priorities keep changing or prefer doing the same thing repeatedly.
Tell me about a time you set a goal for yourself and how you approached achieving it
Describe one positive leadership/managerial style you liked from one of your previous managers and how did that affect your workstyle
Given a sequence of words as a single string, place them into lines of specified width. Return the number of lines needed.
Your company has hired interns who need to relocate for the summer. You are in charge of assigning apartments (flats) to them. Apartments have at least one bedroom and each intern will get their own bedroom. Interns can indicate whether they prefer to share a 2 (or more) bedroom apartment (flat) with other interns,or a one-bedroom to themselves. Note that the number of single-occupancy and shared apartments (flats) is finite, so interns may not get their preference.
Your goal is to assign people to apartments (flats) for their internship, matching their preferences to the best of your ability. The remaining people should be matched to the rest of the available units.
You have the following data structures:
struct Apartment { int apt_id; int num_bedrooms; }struct Person { std::string name; bool wants housemates; }Return unordered_map<int, vector<char>> apartments_to_tenants containing a list of apt_ids with the names of tenants residing in that apt.
Given a sequence of digits of size S, return the subsequence that represents the largest possible number of size K that could be formed from the sequence maintaining the input order. Follow-up : asked for a different approach with same time complexity and discussed both.
Summary
I interviewed for an L4 Software Engineer role at Google, enduring a lengthy 6-month process across multiple technical and behavioral rounds. Despite performing well in most interviews, my application was ultimately rejected due to not meeting the strict 3-year experience criteria at the final stage.
Full Experience
I recently got the chance to interview with Google. I applied directly on the career portal, and a recruiter reached out to me, giving me 1 month to prepare.
Round 1: Screening Round 1
It started with a brief introduction, and then the panelist jumped to the question. I had already added a post for the same (linking to another LeetCode post). There was a slight miscommunication where the interviewer didn't explicitly ask for something, but it was expected from my end to further optimize the solution. The recruiter mentioned that the feedback was not negative, so I could have another round or reapply after the cooling period. I asked for another round. Feedback: Neither positive nor negative.Round 2: Screening Round 2
This round focused on finding a vertical line to divide rectangles into equal areas. It was an open-ended question, and I was expected to clarify details by asking questions. It was challenging, but I eventually solved it using Binary Search, and the interviewer was happy. A few days later, the recruiter confirmed I had cleared the screening rounds and would proceed to onsite rounds. Feedback: Positive.The onsite rounds were scheduled after 2 weeks.
Round 3: Onsite Round 1
After an introduction, the interviewer presented a problem: finding all subarrays forming a 'good' arithmetic sequence (common difference -1 or 1). I started with a brute-force solution, then optimized it to an O(n) solution, which satisfied the interviewer. I was also asked to write unit test use cases for the code. Feedback: Positive.Round 4: Onsite Round 2
This round involved designing a job scheduler for N machines using given blocking APIs:countWords() and isTaskCompleted(). The goal was to optimize job completion time and minimize API calls. I used a round-robin mechanism with a queue to track available machines and a method to check job completion. The interviewer asked follow-up questions and tweaked the problem to assess my adaptability. Feedback: Positive.Round 5: Onsite Round 3
I was asked to design a music playlist shuffler that returns a random song, ensuring no song is returned again for the next K plays. Initially, I proposed an O(n) time and O(n) space solution using a Queue. The interviewer pushed for optimization, and I came up with an O(1) time and O(K) space solution. I was also asked to write unit test cases. Feedback: Positive.Round 6: Googlyness
This was a short behavioral round. I discussed my current role and answered team-based questions such as how I would build a team, manage an underperforming team, and resolve conflicts. Feedback: Positive (implied by proceeding).After 1 week, the recruiter informed me that all feedback was in, and they wanted to proceed with team matching. This began the team matching phase.
Round 7: Team Matching
This started with a self-introduction, current role, responsibilities, and reasons for seeking a change. Then, a High-Level Design (HLD) problem was asked, focusing on my approach rather than detailed implementation. There were minor hiccups, but overall, the discussion went well. The manager briefed me on the team. Feedback: The manager was okay to proceed.At this point, things took an unexpected turn. The recruiter called, stating an eligibility issue related to my years of experience. I had 2 years and 10 months, while the new strict criteria required 3 years. My expectations were shattered. I was asked if I would wait 2 months, during which the application would resume. I agreed.
After about 1.5 months, I received a call for another round.
Round 8: Extended Round
The interviewer started with an intro and then presented a design question, emphasizing the approach over implementation. I had to design a library to evaluate a boolean expression and determine if it could ever be TRUE. Expectations included user interaction (for non-coders), input format, library invocation, data structures (with complexity considerations), class/API declarations, the final evaluation logic (assuming helper APIs), and the algorithm's space/time complexity. I outlined the classes, APIs, and evaluation logic, proposing a 2^N approach for N variables. The discussion went well, and the interviewer seemed happy.Subsequently, the process stalled again, and I was asked to wait. After another month, the recruiter called with the final verdict: the feedback on the Extended round didn't go well, and they couldn't proceed. The entire process took around 6 months. I had kept my focus solely on Google, which I now realize was a mistake. Despite my determination and confidence after the rounds, the outcome was not in my favor. I am now trying to move past this and hope to land a good offer soon. I initially planned to write this post only if I got selected, but it's important to share the journey; I won't give up and will come back stronger.
Interview Questions (6)
Given a set of points in an X-Y plane representing rectangles, find a vertical line which divides the plane into two halves of equal areas. NOTE:
- Given rectangles can overlap with each other.
- The vertical line can pass through the rectangles.

Given an array of numbers, find all the subarrays which are forming a good arithmetic sequence (AP). A good arithmetic sequence is a sequence of numbers having a common difference equal to -1 or 1. E.g., {1,2,3} and {3,2,1} are good arithmetic sequences with common differences 1 & -1 respectively. I was also asked to write use cases for unit testing the same code.
There is a class given which has below APIs available:
countWords()(blocking in nature, doesn't imply job is done)isTaskCompeleted()(tells whether the job is actually completed).
- Make sure scheduling is correct among all the machines.
- Make sure to optimize the time for the jobs to be completed.
- Make sure to use the available APIs minimal number of times (as they are blocking calls).
Design a music playlist shuffler (music represented as an array of anything, e.g., integer, string).
- It should always return a random music.
- The returned music should not be returned again for the next K plays.
rand() method provides in C++. I was also asked to write use cases for unit testing the same code.I was asked about my current role and some team-based questions:
- How would you build a team?
- You are being appointed as a manager of an underperforming team, how would you handle the team and what will be your approach to increase the efficiency of the team?
- How would you resolve a conflict within a team?
Design a library to solve a boolean expression and return whether the boolean expression can be evaluated to TRUE or not in any case. E.g:
( (a || b ) && c ): The expression will evaluate for TRUE when value for c is TRUE and any one of a & b is TRUE.a && ~a: This expression can never be evaluated to TRUE.
- How would a person who doesn't know how to code the underlying logic & only good with Maths going to use the Library to get the desired result?
- How the input should be?
- How the libarary will be invoked?
- Which data structures are going to be used & why (need to be cautious about the space & time complexity)?
- Can you write the associated Classes & APIs for the same (only declarations)?
- Can you code the final logic on how the expression will be evaluated? (we can assume we have helper APIs available to check for format & errors)
- What is the expected space & time complexity of the algorithm for part 6?
Preparation Tips
I was given 1 month to prepare for the screening rounds, and the onsite rounds were scheduled after 2 weeks. I focused my preparation solely on this opportunity and did not apply to any other jobs, which I later realized was a mistake.
Summary
I successfully navigated a rigorous 6-month interview process for a Senior Software Engineer (L5) role at Google, ultimately receiving an offer after multiple coding rounds, a system design interview, and a behavioral 'Googliness' round, despite several challenges and follow-up rounds.
Full Experience
For the Senior Software Engineer role at Google, I went through a total of seven rounds, excluding team matching. I have 7 years and 6 months of experience, coming from Amazon.
Round 1: Coding
This round focused on finding complementary numbers. I started with a naive solution, then optimized its time complexity, and even discussed a distributed system approach. This round went pretty well.
Round 2: Coding
I faced a LeetCode medium-level Tree problem. I managed to solve it, but I believe the interviewer gave a 'no hire' rating because I didn't ask enough clarifying questions and jumped straight to the solution.
Round 3: Coding
This was a medium-level randomization question. Initially, my approach was messy, but the interviewer was patient, allowing me to clean up and further optimize my code. I received a 'hire' rating for this round.
Round 4: Googliness
This was a behavioral round. I had prepared using the STAR method, coming up with question templates and answer patterns with the help of ChatGPT. It went pretty well.
Round 5: System Design
This round also went quite well. The interviewer began with a simple role-based access control system and gradually introduced more complex scenarios. My experience at Amazon and watching various YouTube videos on design patterns proved very helpful.
After these initial rounds, the recruiter reached out for team matching. I spoke with four teams, but three weren't compatible due to mutual fit or location preferences. The fourth team was a good match, and the recruiter proceeded to the Hiring Committee. However, the Hiring Committee suggested another coding round due to a 'no hire' rating from one of the earlier coding interviews.
Round 6: Coding
This was the most disappointing round. The interviewer gave me a medium question, which I solved in just 10 minutes. He gave me the impression that I had done an awesome job, but then proceeded to waste the remaining 35 minutes with unrelated discussion. He eventually gave a 'lean hire' rating. This led to another decision from the Hiring Committee.
Round 7: Coding
Due to the 'lean hire' in Round 6, the Hiring Committee requested another coding round with an L6+ engineer to resolve the conflict. This round was awesome. I was given a LeetCode hard DP problem and solved it properly, receiving a 'hire' rating.
Even after this, the drama wasn't over. The matched team somehow became unavailable after making me wait for 3-4 weeks. Fortunately, I found an even better team, and they extended an offer, which I happily accepted! The overall process took almost six months, with the coding rounds completed within a month, but the subsequent HC decisions, follow-up rounds, and team fitment taking a very long time.
Interview Questions (2)
I was presented with a problem to find complementary numbers, likely a variation of finding two numbers that sum to a target. I began with a naive approach, then optimized it for better time complexity, and finally discussed how to implement a solution in a distributed system environment.
I was asked to design a Role-Based Access Control (RBAC) system. The interviewer started with fundamental RBAC concepts and then progressively introduced more complex requirements and scalability challenges for the system.
Preparation Tips
Coding
My preparation for coding rounds primarily involved practicing on LeetCode. I focused on covering a broad range of topics, solving mostly medium-level questions, and a few hard ones. For any topic where I lacked confidence, I started with easy problems to build a strong foundation. I believe understanding the concepts thoroughly is more important than simply solving a high number of problems.
Design
My experience at Amazon was a significant asset for the system design interviews. Additionally, I found the Codekarle YouTube channel very helpful for gaining a foundational understanding of various design concepts, even if not for the final stages of preparation. For specific topics I was unsure about, I would search on YouTube, and I consistently found intuitive and informative videos from excellent creators.
Googliness (Behavioral)
For the behavioral round, I thoroughly prepared using the STAR method. I created templates for common 'Tell me about a time when...' questions and developed a pattern for my answers, which I refined with the help of ChatGPT. This preparation ensured I could articulate my experiences clearly and effectively.
Summary
This post describes the 'Longest Increasing Subsequence' problem that I encountered during my Google onsite interview, complete with problem statement, examples, and a detailed solution approach.
Full Experience
During my onsite interview with Google, I was presented with the classic 'Longest Increasing Subsequence' problem. I focused on explaining the problem thoroughly, illustrating it with examples, and then detailing a dynamic programming approach, including its recursive formulation and a Python code example. I also discussed how memoization could optimize the solution, acknowledging the time complexity of the initial recursive approach.
Interview Questions (1)
Longest Increasing Subsequence (LIS)
Problem Description:
Given an array arr[] of size N, the task is to find the length of the Longest Increasing Subsequence (LIS). An LIS is the longest possible subsequence in which the elements are sorted in increasing order.
Examples:
1. Input: arr[] = [3, 10, 2, 1, 20]
- Output: 3
- Explanation: The longest increasing subsequence is
[3, 10, 20].
2. Input: arr[] = [3, 2]
- Output: 1
- Explanation: The longest increasing subsequences are
[3]and[2].
3. Input: arr[] = [50, 3, 10, 7, 40, 80]
- Output: 4
- Explanation: The longest increasing subsequence is
[3, 7, 40, 80].
Summary
I encountered the Robot Room Cleaner problem during my Google onsite interview, which involved using a DFS approach to navigate and clean a grid.
Full Experience
During my recent Google onsite interview, I was presented with the 'Robot Room Cleaner' problem. This problem required me to program a robot to clean an entire room represented as a grid, utilizing a specific API for movement and cleaning. I had to develop an algorithm, specifically a depth-first search (DFS) approach, to explore the room systematically while avoiding revisiting cells and ensuring complete coverage.
Interview Questions (1)
You are controlling a robot that is placed in a room. The room is represented as a grid where each cell can be either empty or blocked. The robot can move in four directions: up, down, left, or right. It can also clean the cell it’s currently on.
The robot starts in an arbitrary cell and can move freely. Your task is to design an algorithm to clean the entire room using the robot.
Input:
- The robot API interface with the following methods:
robot.move(): Moves the robot to the next cell.robot.turnLeft(): Turns the robot 90 degrees to the left.robot.turnRight(): Turns the robot 90 degrees to the right.robot.clean(): Cleans the current cell.
Constraints:
- The room is guaranteed to be a rectangular grid.
- The robot can move to any cell (empty or blocked).
- The robot will not move outside the room.
- The robot can turn left or right without restriction.
Example:
Suppose the room is represented as a 2D grid, where 0 represents an empty cell and 1 represents a blocked cell:
[
[1, 1, 1, 1, 1],
[1, 0, 0, 0, 1],
[1, 0, 1, 0, 1],
[1, 0, 0, 0, 1],
[1, 1, 1, 1, 1]
]The robot starts at position (1, 1) facing up. It can perform the following actions:
- Clean the current cell.
- Move to the right.
- Clean the current cell.
- Turn right.
- Move to the down.
- Clean the current cell.
- Turn right.
- Move to the left.
- Clean the current cell.
- Turn right.
- Move to the up.
- The robot has now cleaned the entire room.
Summary
I recently participated in an onsite interview with Google where I was tasked with solving the 'Longest Consecutive Sequence' problem, a classic algorithm challenge.
Full Experience
During my onsite interview at Google, the interviewer presented me with the problem of finding the longest consecutive elements sequence in an unsorted array of integers, emphasizing an O(n) time complexity requirement. I proceeded to discuss and implement a solution based on using a hash set to efficiently check for consecutive numbers. I also showed a slightly different approach during the discussion.
Interview Questions (1)
Problem Statement
Given an unsorted array of integers, find the length of the longest consecutive elements sequence.
Your algorithm should run in O(n) complexity.
Examples
Example 1:
Input: [100, 4, 200, 1, 3, 2]
Output: 4
Explanation: The longest consecutive elements sequence is [1, 2, 3, 4]. Therefore its length is 4.
Example 2:
Input: [0, 3, 7, 2, 5, 8, 4, 6, 0, 1]
Output: 9
Explanation: The longest consecutive elements sequence is [0, 1, 2, 3, 4, 5, 6, 7, 8]. Therefore its length is 9.
Constraints
- The array may contain duplicates.
- The array may contain negative numbers.
Function Definition
Summary
I interviewed at Google India for an L3 Software Engineering role in April 2024. Despite performing well in some rounds and optimizing solutions, I was ultimately rejected, primarily due to my performance in a system design round and an ad-hoc array coding problem.
Full Experience
My Google India interview experience for the L3 Software Engineering role began with a recruiter call around November 2023. After successfully passing a Team Fit Round, I requested and was granted one month for preparation. The interview process consisted of four coding rounds (one telephonic, three onsite) and a dedicated Googliness round.
Telephonic Round 1:
This round primarily focused on my past experiences, current role, and the projects I had been working on. The recruiter aimed to assess how closely my profile aligned with the available positions.
Coding Round 2:
I was presented with two medium-hard problems involving arrays and a sliding window with hash-maps. The second problem was a follow-up to the first and required the use of a linked list. We also delved into a discussion on the internal working of hash-maps. Overall, this round went well.
Coding Round 3:
This round involved a modified version of a Rate Limiting Problem, which was a system design challenge. I had to use three hash-maps in my solution. While the round generally went well, I missed a crucial aspect related to handling infinite input streams/requests for asynchronous API calls. Additionally, we had a 15-minute discussion on the testing of APIs. I later learned that this round was a significant factor in my rejection.
Coding Round 4:
I faced a hard, ad-hoc type problem on arrays. The interviewer was specifically looking for an O(N) solution. I initially proposed an O(N^2) solution and, after receiving hints, was able to optimize it to O(NlogN). Following a long discussion, I finally managed to arrive at an O(N) solution, though I only had time to write pseudocode. This round also contributed to my rejection.
Coding Round 5:
A medium-difficulty, sorting-based counting problem was asked where I needed to implement three APIs: insert, remove, and getMin. I successfully optimized the time complexity for all APIs from O(logN) to O(1) by utilizing extra space, specifically employing Bucket sort and an LRU cache. This was my strongest round.
Googliness and Leadership Round:
This round consisted of behavioral and leadership questions. I was asked about my approach to handling an ML-based project with no hard deadline, potential changes to the current culture of my organization, and various situation-type questions. This round went well.
Result:
I was informed that my interview feedback was negative and was advised to reapply after one year, which I found somewhat strange to believe. I subsequently found out that my rejection was primarily due to my performance in rounds 3 and 4.
Interview Questions (6)
Discussed the internal mechanisms and working principles of a hash-map data structure.
Design a modified version of a rate-limiting system. The problem specifically required the use of three hash-maps in the solution. I needed to consider how to handle infinite input streams or asynchronous API requests effectively.
Implement three APIs: insert, remove, and getMin. This was described as a medium-difficulty, sorting-based counting problem.
Discuss my strategy and approach for managing an ML-based project when there is no strict hard deadline.
Provide insights and suggest possible changes or improvements to the current culture within my organization.
Addressed various hypothetical workplace situations, demonstrating my problem-solving and interpersonal skills.
Preparation Tips
I took about one month for preparation after the initial recruiter call, focusing on the various rounds.
Summary
I interviewed for an SDE L4 role at Google and underwent preliminary screening followed by two on-site rounds. Despite coding solutions for all questions, I was ultimately rejected for the L4 position.
Full Experience
Application and Recruiter Screening
I applied for both L4 and L3 SDE roles through a referral around early November 2023. Initially, my L4 application was rejected. However, a recruiter reached out in mid-December 2023, expressing interest in my profile for an L3 position. After a recruiter screening call in mid-January 2024, discussing my day-to-day responsibilities, I was given a month to prepare for the preliminary screening. I also had a mock interview with a Googler during this preparation phase.
Preliminary Screening
This round took place in mid-February with an interviewer from India. The core idea of the question was similar to LeetCode's Queue Reconstruction by Height. I quickly explained the O(n^2) brute-force solution and started discussing the optimized O(n log n) approach using Fenwick Tree + Binary Search. As I couldn't fully explain the optimized approach in time, the interviewer asked me to code the brute-force solution, which he accepted. Later that evening, the recruiter informed me that I was a 'Lean Hire' by L4 standards and would proceed as an L4 candidate for the on-site rounds.
On-site Round 1
I had two weeks to prepare for this round. The interviewer was from Singapore. The question was: given K and an array of integers, find the longest subarray where sum <= k. I unfortunately struggled here, initially attempting a memoization approach. Despite a hint from the interviewer, I wasn't receptive. I coded my initial approach, and after discussing its time and space complexity, he suggested a simpler two-pointers solution, which I then implemented. The recruiter later told me I had overcomplicated it. The verdict for this round was 'No Hire'.
On-site Round 2
This round happened a week after the first on-site, with an interviewer from India. The question was Logger Rate Limiter, which is an easy LeetCode problem. I quickly discussed my approach and coded it, achieving O(n) time and space complexity for 'n' calls. We had some discussion about the 'if' conditions, which I corrected. The follow-up asked how to optimize space complexity assuming unique timestamps. I used an additional queue, demonstrating that both the queue and map would hold at most 10 elements in the worst case (similar to a sliding window maximum), achieving O(1) space complexity. I finished this just at the 45-minute mark. Although it felt like a medium-hard problem under interview pressure, I handled it well. Despite this, the recruiter later informed me that I was still a 'No Hire' for this round as per L4 standards. I am yet to receive detailed feedback.
Interview Questions (3)
Given an integer K and an array of integers, find the longest subarray where the sum of its elements is less than or equal to K.
Design a logger system that receives a stream of messages along with their timestamps. Each message should be printed if and only if it is not printed in the last 10 seconds. All messages arrive in non-decreasing order of timestamps. Multiple messages may come at the same timestamp. Implement the Logger class.
Preparation Tips
Preparation Strategy and Tips
I was given a month to prepare for the preliminary screening and an additional two weeks for the on-site rounds. My key takeaways and advice are:
- Look for simple solutions: It's not always the case that Google asks advanced questions. Sometimes, the most straightforward approach is preferred.
- Be receptive to hints: It's crucial to listen to and understand the hints provided by the interviewer; they are often guiding you towards the optimal solution.
- Work on fast thinking and implementation: Being able to quickly grasp a problem and translate it into working code under pressure is vital.
- Be crisp and clear on the basics: A strong foundation in data structures and algorithms is essential, as my struggles in On-site Round 1 demonstrated.
Stay persistent and prepare well everyone! All the best!
Summary
I recently experienced an online interview with Google, where I successfully navigated the 'Maximum Subarray Sum' problem by implementing Kadane's algorithm.
Full Experience
I recently had an online interview with Google, and I wanted to share my experience tackling the 'Maximum Subarray Sum' question. This problem is a classic algorithmic challenge that tests your ability to find the most efficient solution for a common computational problem. During the interview, I explained my thought process before diving into the code. I chose Kadane's algorithm, which efficiently finds the maximum subarray sum in a single pass through the array. This approach has a time complexity of O(n), making it optimal for this problem.
Interview Questions (1)
Problem Statement:
Given an array of integers, find the contiguous subarray with the largest sum. The array can contain both positive and negative integers.
Example:
Input: [-2, 1, -3, 4, -1, 2, 1, -5, 4] Output: 6 (Explanation: The subarray [4, -1, 2, 1] has the largest sum.)
Summary
I successfully navigated the Google SDE II (L3) interview process in India, which spanned three months from initial recruiter contact to receiving an offer. My journey included a phone screen, four challenging onsite Data Structures & Algorithms rounds, and a crucial Googleyness behavioral interview.
Full Experience
My interview journey with Google for the SDE II (L3) position in India began when a recruiter reached out via both phone and LinkedIn. The entire process, from the initial contact to receiving the final results, took approximately three months. Feedback after each round typically took between one week to a month.
Resume Screening Round
The recruiter evaluated my resume to determine if my experience aligned with the role. We discussed my responsibilities at my current company, my LeetCode coding profile, and the time I would need to prepare for the technical interviews.
Phone Screening Round (45 mins)
This round focused on Data Structures and Algorithms (DSA). I was asked two questions of medium difficulty. The first question's logic was somewhat similar to Longest Consecutive Sequence, though it was a bit more complex. The second was a variation of the painter's partition problem, akin to Capacity To Ship Packages Within D Days or Allocate Minimum Number of Pages.
On-site Round 1 (DSA - 45 mins)
This technical round presented two medium-hard DSA questions. One question had a concept similar to House Robber III, and I also faced a few follow-up questions. The other was similar to Dungeon Game.
On-site Round 2 (DSA - 45 mins)
Again, I faced two medium-hard questions. One operation focused on subsets, with logic based on Partition Equal Subset Sum. The second was also based on subsets, similar to Partition Array Into Two Arrays To Minimize Sum Difference.
On-site Round 3 (DSA - 45 mins)
I was presented with two more medium-to-hard DSA questions. One was a specific problem discussed on LeetCode: Maximize Loss Interval. The underlying logic for the second question was similar to Maximum Employees To Be Invited To A Meeting.
On-site Round 4 (DSA - 45 mins)
This round involved one hard DSA question. It was similar to Count Of Smaller Numbers After Self, and I was also asked to solve for the inverse case where given the output, I had to find the input.
On-site Round 5 (Googleyness - 45 mins)
The Googleyness round is a crucial behavioral interview designed to assess cultural fit. Questions test thinking, leadership qualities, and how one reacts and handles various situations. I was asked several questions to gauge these aspects.
Hiring Committee and Team Matching
After completing all onsite rounds, my performance was evaluated by each interviewer, and feedback was submitted (e.g., "No hire," "Lean hire," "Hire," "Strong hire"). This feedback, along with my resume and phone screening results, was then reviewed by the Hiring Committee. Subsequently, I went through the Team Matching process, which determines the specific team I would join at Google since my application wasn't tied to a particular team initially.
Successfully navigating these stages, I made it through and can now proudly call myself a Googler.
Interview Questions (15)
I encountered this specific problem during my interview: Maximize loss interval. This problem was directly presented as discussed on LeetCode.
Why Google and what motivates you for the Google?
Tell me about a time when you had to deal with a difficult team member. How did you handle the situation?
Describe a project you worked on that didn't go as planned. What did you learn from the experience?
Describe a time when you had to prioritize multiple tasks with conflicting deadlines. How did you manage your time?
Tell me about a time when you had to adapt to a new and unfamiliar situation. How did you approach it?
Describe a challenging situation you faced in a previous job. How did you overcome it?
Preparation Tips
My preparation involved consistent practice on various coding platforms. I extensively used LeetCode, GeeksforGeeks (GFG), Codeforces, and CodeChef. During the interviews, I focused on remaining calm and treated my interviewers as friends to ease nervousness. I always ensured to clear any doubts by asking questions, even small ones, and was ready to create test cases when asked.
I made sure to be vocal throughout the process, explaining my approach clearly, ideally while writing code. I would start with naive or brute-force solutions and then iteratively move towards optimized solutions, demonstrating my knowledge of data structures. Key aspects I focused on in my code were neatness, good variable/method names, proper indentation, understanding of time and space complexities, and the ability to select the most optimized data structure for a given problem. Ultimately, I maintained self-belief throughout the demanding process.
Summary
I had a phone screening interview with Google for an L3 role where I was presented with a challenging graph/geometry problem related to message spreading.
Full Experience
I recently had a phone screening interview with Google for an L3 role. The interviewer presented a problem involving spreading messages on a Cartesian plane, asking if all given points would receive the message within a specified range.
Interview Questions (1)
You are given four coordinates on a Cartesian plane, for example, A(0,8), B(0,7), C(0,6), and D(0,5). A given range is 4. A source and a destination are also provided. The task is to determine if all points will receive the message, considering that messages spread to all sides and points within the given range receive the message. Your source and destination can be any point. Hint: For range, you need to find the distance between two points.
Summary
I recently took an online assessment for Google in 2023, where I was presented with a challenging dynamic programming problem focused on counting special subsequences with specific properties.
Full Experience
I participated in an online assessment for Google in 2023. The assessment posed a single, intricate problem that demanded a deep understanding of subsequences, character frequencies, and modular arithmetic. The core task was to identify and count 'special subsequences' based on length, distinct characters, and maximizing the sum of character frequencies from the original string. I meticulously analyzed the problem statement, noting the constraints and the modulo operation requirement, which suggested a dynamic programming approach with careful state definition would be necessary.
Interview Questions (1)
A Special Subsequence of a string S of length N is a subsequence that satisfies following properties:
- Length of Subsequence is exactly K.
- All the characters in the subsequence are distinct.
- Let fi be the frequency of character i in the original string. Then the summation of fi for all characters i in the subsequence is maximum among all such subsequences.
Given a string S and an integer K. Find the number of distinct Special Subsequences of string S. As this number can be large print answer modulo 109 +7.
Note: A subsequence of a string is a new string which is formed from the original string by deleting some (can be none) of the characters without disturbing the relative positions of the remaining characters.
Example:
Given N=12, K=8, S= "fpbavjsmppt"
Output: 108
Summary
I interviewed for an SDE 1 role at Google and successfully solved two LeetCode problems, Reverse Integer and Next Permutation, in the first round. I am currently awaiting feedback.
Full Experience
I applied for the SDE 1 role at Google through a referral and received an interview call after two months. The first round consisted of two coding questions. I was able to successfully solve both problems. Currently, I am still waiting for feedback from HR regarding the next steps.
Interview Questions (2)
Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such an arrangement is not possible, it must rearrange it as the lowest possible order (i.e., sorted in ascending order). The replacement must be in-place and use only constant extra memory.
Summary
I had my first round interview at Google where I was asked to implement a function that formats a list of strings into a table based on a maximum line width constraint.
Full Experience
I recently had my first round interview at Google. The interviewer presented a coding challenge focused on string manipulation and formatting. The problem involved taking a list of strings and arranging them into a table, adhering to a specified maximum line width. I had to carefully consider how to calculate column widths and distribute the strings while maintaining left-alignment and maximizing the number of columns without violating the line width constraint.
Interview Questions (1)
We have a style guide (for example, lines must be at most 80 characters wide). We have a tool that automatically formats code to the style guide. One thing it can do is arrange lists of strings into a table. The strings in each column are left-aligned to be more easily readable. It leaves no holes in the table except after the last string in the last row (i.e. every cell contains a string, except possibly in the last row). Of course, the strings remain in the original order.
Example:
W = 70 (characters) S = [IsAudioBuffer, GetTimestamp, SetTimestamp, GetSampleRate, GetSampleSize, GetNumberOfChannels, GetNumberOfSamples, GetDataBuffer, GetChannel]
We can format this as follows:
IsAudioBuffer GetTimestamp SetTimestamp GetSampleRate |
GetSampleSize GetNumberOfChannels GetNumberOfSamples GetDataBuffer |
GetChannel
Given the list of strings, and a maximum number of characters per line, format the table using the maximum number of columns without violating the line width constraint. Column width should be equal
Summary
I recently interviewed onsite at Google, where I encountered a challenging data structures and algorithms problem. The core task involved identifying the longest possible chain of words based on specific rules for word transformation.
Full Experience
I had the opportunity to interview with Google for an onsite position. My interview experience primarily focused on my problem-solving skills, and I was given a complex algorithmic challenge. The interviewer presented a problem about forming word chains, which required careful consideration of several constraints regarding word length and character differences. I was also expected to discuss test cases and the time/space complexity of my solution.
Interview Questions (1)
Given a set of words, find the longest chain of words that can be made out of those words with the following rules:
- Each word in the chain is one letter longer than the previous word.
- Each word in the chain differs from the previous word only by its last letter.
Write test case's. Also, mention the Time and Space complexity for the same.
Constraint Examples:
den -> dent-> dents is valid (meets all constraints)
den -> dew is not valid (same length: 3 characters)
den -> cent is not valid (differs by 1'st char ['d' != 'c'])
Example:
Input: {ben, bent, dew, dents, dent, bet, den}
Output: 3 ({den, dent, dents})
Summary
I recently interviewed for a Google L4 position in Bangalore and successfully received an offer. The interview process spanned over two months and included a phone screen, four coding onsite rounds, and one 'Googlyness' behavioral round.
Full Experience
Phone Screen
The phone screen involved a problem based on Activity Selection. I quickly devised an O(n log n) solution and was able to code it efficiently. This round concluded with positive feedback, allowing me to advance to the onsite interviews.
Onsites
Round 1 (Coding)
This round featured a question centered around string modifications. I proposed a BFS-based optimal approach, which the interviewer found satisfactory and asked me to code. After implementing it quickly, I handled two follow-up questions effectively. For the third follow-up, I suggested a DFS-based approach and managed to code it swiftly in the remaining seven minutes. The round finished on time, leading to a Lean Hire/Hire verdict.
Round 2 (Coding)
The second coding round presented a problem involving bits/byte manipulation. It took me some time to fully grasp the question, requiring several clarifications before I could provide a basic solution. Despite the interviewer's prompts for optimization, I couldn't come up with a better approach beyond my initial solution. I coded my solution and discussed 2-3 follow-up questions on my code. I felt this round didn't go as well as I had hoped, resulting in a Lean Hire/Lean No-Hire verdict.
Round 3 (Coding)
I faced a question based on a 2-D matrix in this round. I instantly came up with a DP-based solution that satisfied the interviewer, and I coded it very quickly. A tricky follow-up question followed, for which I initially proposed a backtracking solution with exponential time complexity. Upon being asked to optimize, I presented an optimal BFS + Priority Queue-based approach. The interviewer was pleased and asked me to code it, which I did promptly. We verbally discussed a final follow-up question. This round was flawless, ending 10-15 minutes early, giving me a chance to ask about Google's culture. The verdict was Hire/Strong Hire.
Round 4 (Coding)
The interviewer began by asking about my resume, technologies, and projects. After 5-10 minutes, we moved to the first coding question, which was a LeetCode Hard problem based on Heaps. I discussed a Priority Queue-based idea with the interviewer, who asked me to code it to confirm its validity for all edge cases. I meticulously coded the solution, which took 20-25 minutes, ensuring all edge cases were covered. The interviewer was satisfied with my code. With 10-15 minutes remaining, we had a casual chat. This round also went flawlessly, resulting in a Hire/Strong Hire verdict.
Round 5 (Googlyness)
This behavioral round featured a very friendly interviewer. After introductions and discussing my projects, I confidently answered a range of standard behavioral and situational questions. The interviewer seemed satisfied, and the interview concluded 15 minutes early, leading to a Hire/Strong Hire verdict.
After the onsite rounds, I had team fit calls with two teams and chose the one that aligned best with my expectations. My candidate packet was then sent to the Hiring Committee and was approved within a week. Overall, the entire process took over two months, but I am very pleased with the final outcome.
Interview Questions (1)
Given a set of activities, each with a start and finish time, select the maximum number of non-overlapping activities that can be performed by a single person. I came up with an O(n log n) solution.
Preparation Tips
My preparation involved consistent practice on LeetCode, with a particular focus on Google-tagged questions, mostly at a medium difficulty level. My background in competitive programming helped me quickly adapt to the pace. I found the discussion sections for LeetCode problems to be an invaluable resource for optimizing solutions and understanding diverse approaches. During the interviews, proactive communication and thinking out loud were crucial and received positive feedback. I prioritized quality over quantity, focusing on mastering major topics like Binary Search, Recursion, DP, and Heaps, ensuring I was comfortable writing code for each data structure. I also emphasize the importance of perseverance, advising others not to get disheartened if one or two rounds don't go perfectly.
Summary
I recently completed a Google L4 phone screen where I encountered a challenging variation of the Longest String Chain problem, specifically requiring the chain to begin with a single-character word.
Full Experience
I had my phone screen interview for an L4 Software Engineer role at Google in June 2022. The session was fairly standard, starting with introductions and a brief chat about my background. The main part of the interview focused on a coding problem. The question presented was a clear variation of the 'Longest String Chain' problem found on LeetCode. The core difference was an explicit constraint: the string chain had to always start with a single-character string. For example, a valid chain would progress like 'a' -> 'ab' -> 'abc'. I focused on understanding this specific modification and how it would influence the dynamic programming approach typically used for the original problem.
Interview Questions (1)
Summary
I recently participated in virtual interviews for a Software Engineer - Full Stack role at Google India, which consisted of three technical coding rounds and one behavioral round focusing on situation-based questions.
Full Experience
Hello, I recently had the opportunity to interview virtually at Google, India for a Software Engineer - Full Stack Developer role. This position was for experienced professionals. The interviews were conducted over Google Meet, with each interview typically on a separate day, a schedule I discussed and arranged with my recruiter. The interview process comprised four rounds: three technical coding rounds, each approximately 45 minutes long, with no system design components, and one 45-minute behavioral round.
Round 1:
I was presented with a grid of dimensions n x m, composed of 0s and 1s, where 0 denotes a free cell and 1 a wall. The challenge was to determine if a robot, starting at (0,0), could reach the end cell (n-1, m-1) by breaking at most one wall in the grid.
Round 2:
This round focused on OS job scheduling, presenting a more open-ended discussion. I wasn't provided with a concrete input format, but the core task was to discuss how to return the sequence of execution and the starting time for each job, given their arrival and execution times, based on a First Come First Serve (FCFS) principle. The interviewer then posed a follow-up question: how would the algorithm change if each job had an associated priority?
Round 3:
I was given an n-ary tree and two specific edges, identified by the vertices connecting them (V1, V2) and (V3, V4). The problem asked to return the number of vertices (nodes) in each disconnected component if these two edges were removed from the tree. This task needed to be performed for Q queries, with the assumption that the tree was fully-connected before each query.
Round 4:
This round was entirely behavioral. The questions were primarily situation-based, often starting with 'tell me about a time...' and followed by probing questions.
Interview Questions (3)
Given a grid n x m consisting of 0's and 1's, where 0 represents a free cell and 1 represents a wall. If a robot is placed at first cell, i.e. position (0,0), find whether it can reach the end cell i.e. (n-1, m-1), by breaking at the most one wall in the grid.
Given a list of jobs, with their arrival time and execution time, return the sequence of execution and the starting time of each job, on a First Come First Serve(FCFS) basis.
Follow up question: If priority is associated with each job, how will the algo change in that case.
Given a n-ary tree, and 2 edges represented by the vertices connecting them (V1, V2) and (V3, V4). Return the number of vertices (nodes) in each disconnected component, if these 2 edges are removed from the tree, basically if the tree was disconnected. Given Q queries, return the result for each query, assuming tree is fully-connected each time.
Summary
I had a two-stage interview process for a Data Scientist role at Google in Zurich, consisting of a recruiter call and a technical phone screen. Despite performing well in data intuition and coding, a deep dive into Bayesian statistics led to my rejection after the first technical round.
Full Experience
My interview process for the Data Scientist role at Google in Zurich began with a 30-minute recruiter call. This call primarily focused on understanding my background, where I was asked to describe my previous projects and explain my motivation for applying to Google.
I then proceeded to a 1-hour technical phone screen, which was divided into three sections: data intuition, statistics, and live coding. In the data intuition section, the interviewer asked me about designing a survey, which had a strong statistical basis. The statistics section delved into concepts like Bayesian statistics and confidence intervals. Finally, the live coding challenge involved sampling from a normal distribution, for which I was permitted to use a Python library.
I felt I performed quite well in both the data intuition and coding parts. However, the interviewer explored Bayesian statistics in considerable depth, and I eventually struggled to provide satisfactory answers. Despite feeling generally positive about my performance, I received a rejection after this first technical round. The recruiter did encourage me to reapply after a six-month period.
Interview Questions (4)
Describe your previous projects and experiences relevant to the Data Scientist role.
Explain your reasons for applying to Google and this specific Data Scientist role.
How would you design a survey, considering statistical principles and potential biases? This question was mostly statistics-based.
Implement a function or code snippet to sample from a normal distribution. I was allowed to use a Python library for this task.
Summary
I successfully interviewed for an L3 Software Engineer position at Google in Bangalore, navigating through 4 technical rounds and a Googliness assessment, which ultimately resulted in receiving an offer.
Full Experience
I was reached out to by a Google recruiter for an L3 position. Initially, a phone interview was scheduled, but my recruiter managed to fast-track me directly to the on-site interviews. All five on-site rounds—four technical and one 'googliness' round—were scheduled across five consecutive days.
Interview Questions (5)
Given two arrays appointmentTime and appointmentDuration and an integer numRooms. Each room has an id ranging from 0 to n-1. Find the room that gets most appointments if a room can have only one appointment at a time, and each appointment is assigned an available room with the smallest room ID.
There is a highway of length m and has n+1 lanes. I am a frog trying to get across the highway. I can either move left, right, up or stay in my current position for 1 unit of time. There are k cars on the highway, given as {laneNumber, initialPosition, velocity}. The cars can move in either directions with unit speed. Find the minimum time the frog will take to cross the highway. Also find the worst-case time complexity.
Assume the initial lane and last lane are empty. My frog starts from lane 0 and position x. The cars can have either +1 or -1 velocity. Once a car leaves the frame, they don't return.
You are given an array of commit IDs in chronological order. There is one bad commit in the order that renders all subsequent commits bad. You have an isBad(commit#) function that tells if a particular commit is bad or not. You have to find the first bad commit. This is the same as First Bad Version question on LeetCode.
A question very similar to Word Break II.
I am sitting on a computer (Main-computer) on a network. The network has a few computers, connected directly or indirectly to me. Each computer has a 'unique' string identifying it (like MAC address), but for simplicity, these MAC addresses can be assumed to be from A-Z. The goal is to find the total number of computers on the network. I cannot access other computers on the network directly, but I can send a program on the network that EACH computer on the network will install. This program will have a send(string) function and a receive() function. The send function will send the string passed to the function to all its IMMEDIATE neighbours (it's handled implicitly - no information about neighbours is given). The 'receive' function takes the string sent from its immediate neighbours. I need to write a 'receive' function such that after a while, the Main-computer can print out the total number of computers on the network.
Some clarifications discussed with the interviewer:
- Each computer gets identical
send()andreceive()functions. - I only have access to the
send()function on the main-computer. - There is no global memory that can be accessed by all computers, but each program can access the local memory of the computer it is running on.
- Since there are a lot of async calls happening, assume a mutex lock on this memory while in use.
Preparation Tips
I began my preparations approximately three months before the interviews. By the time of the interviews, I had solved around 250 problems on LeetCode, broken down as 50 easy, 140 medium, and 60 hard questions. Additionally, I went through numerous previous interview experiences. A helpful tip I found was using LeetCode premium for company-specific questions. Although most of the interview questions were new to me (except for one), practicing company-specific problems gave me a good understanding of the expected difficulty level. From my experience, for on-site interviews, the expectation is generally to solve two medium or one hard question for 'strong-hire' feedback. Interviewers also assess speed, communication of ideas, code readability, and time/space complexity.
Summary
I interviewed for an L3 New Grad Software Engineer position at Google in February 2022. The process involved a phone screen and two onsite rounds, covering Data Structures & Algorithms and a 'Googlyness' behavioral segment. Despite the interviewers not being as friendly as expected, I found the overall interview process to be well-structured and an interesting experience.
Full Experience
Phone Screening Round (45 mins): DSA
My interview started with a small introduction, and the interviewer immediately presented the problems.
-
String Replacements
I discussed different approaches with the interviewer and settled on a concatenation method. For each replacement query, I performed:string ans = s.subtr(0, start) + after + s.substr(start + before.size()); swap(ans, s);. For this to work efficiently, the queries need to be sorted in decreasing order of start index. The interviewer seemed satisfied with my approach. -
Cards
I proposed taking the input as a 3x4 matrix and traversing it in column-major format. I could use if-else statements or a set to check the validity condition. This approach was expected to be constant space and time given the fixed number of cards and attributes. -
Cards Follow up
For n number of cards, I first described the brute-force O(N^3) time complexity approach. To optimize, I suggested using two for loops to iterate over every pair of cards. With these two cards, I could construct the third valid card and check its presence in the given array using an unordered_set for O(1) average time lookups. This led to an O(N^2) time and O(N) space solution.
Onsite Round- 1 (45 mins): DSA
The interviewer jumped directly into the problems without any introductions.
-
Longest Arithmetic Sequence
I discussed my approach and provided a correct solution. The interviewer was satisfied and asked me to code it. I made some minor mistakes during coding but eventually corrected them. -
Longest Arithmetic Sequence Follow up
After coding the previous solution, the interviewer asked for the approach if the constraint (subsequent node in sequence belongs to a lower level) was removed. I discussed the revised approach and managed to code it just as the time was running out.
Onsite Round- 2 (60 mins): DSA + Googlyness
This interviewer seemed quite distant. After a grumpy introduction from their side, I introduced myself, and we moved straight to the coding question.
-
Find Unpainted Segments
I initially proposed a brute-force solution. When asked to optimize, I discussed a Segment Tree approach. The interviewer didn't seem convinced and kept pointing out perceived flaws. As time was short, I proceeded to code the Segment Tree solution, completing only the implementation within the allotted time. -
Googlyness Round
This segment involved behavioral questions:- Tell me about a situation when you went above and beyond what was expected of you?
- What would you do when you have to ship a feature tomorrow, and it starts failing for a certain group of users the day before?
Overall Experience:
I had read many interview experiences mentioning Google interviewers being friendly and helpful, but my experience was somewhat different. None of the interviewers seemed particularly friendly or welcoming. However, it's always a valuable experience to interview for such a large company. The process itself is well-organized and candidate-focused, including a preparatory session before the rounds to explain Google's expectations and flexibility for rescheduling if needed.
Interview Questions (8)
Given a string and replacement queries. Return a string after performing all the replacements.
Ex:
Input: num foo;
replacements: [
{start: 0, before: "num", after: "number"},
{start: 4, before: "foo", after: "bar"}
]
Output: "number bar;"
Class Replacement{
int start;
string before;
string after;
}
start: start index
before: substring that is present at the start index
after: Replace the before substring with after substring.
A card has 4 attributes (shape, size, color, shading). You have been given 3 such cards. A set of three cards is said to be valid if for each attribute either:
a. All 3 cards have the same value, OR
b. All 3 cards have different values.
Write a function valid_set() that takes in a set of cards and returns if the set is valid.
Ex:
Input:
[
{1,1,2,3},
{1,2,2,3},
{1,3,2,3}
]
Output: True
Explanation:
Each card is represented as a row and each attribute as a column.
For the first attribute (0th column), all cards have the same value.
For the second attribute (1st column), all attributes have different values.
For the third attribute (2nd column), all attributes have the same value.
For the 4th attribute (3rd column), all attributes have the same value.
Since for all attributes, all cards either have the same value or different values, this set is valid.
As the number of cards is 3 and the number of attributes is 4, a constant space and time solution was expected.
Given n number of cards, return 3 valid cards set if they exist. (Validity rules explained above for 'Valid Set of Cards')
Given a root of a binary tree, you need to find the length of the largest arithmetic sequence of nodes in the tree. Constraint: Each subsequent node in the sequence should belong to a lower level than the previous node. Note that the longest sequence need not start from the root.
After coding the solution for the previous problem, the interviewer asked what the solution would be if the constraint (each subsequent node in the sequence should belong to a lower level than the previous node) was removed.
Given a series of segments of length 1. Initially, all of the segments are unpainted. Given queries of the form [left, right], return the number of unpainted segments in that range and then paint all the segments in that range.
Tell me about a situation when you went above and beyond what was expected of you?
What would you do when you have to ship a feature tomorrow and it starts failing for a certain group of users the day before?
Preparation Tips
Tips for Preparation:
It's crucial to have a strong grasp of Data Structures and Algorithms. I've found that Google's questions often fall into a 'sweet spot' – slightly above typical DSA problems but not as hard as competitive programming challenges. Therefore, having some competitive programming experience can be a significant advantage.
LinkedIn and Job Search Tips:
- Try to connect with employees of the companies you're interested in. This can increase the likelihood of your profile being recommended to recruiters.
- If you're an undergraduate, make sure your resume is prominently displayed on your profile. Don't passively wait for recruiters to DM you; make it easy for them to find your information.
- Refrain from 'shitposting' (e.g., posting about solving 3 problems today). Instead, share achievements you are genuinely proud of. Excessive or low-quality posts might lead to your connections unfollowing or muting you.
- Ultimately, once a recruiter views your profile, the quality of your resume is paramount.
Beyond LinkedIn, cold emailing is also an effective way to secure interview opportunities. Find a recruiter's email, send your resume with a brief introduction, and highlight your major achievements. Persistence and consistent follow-ups are key.
Summary
I interviewed for an L5 position at Google India in December 2021 and received an offer. The interview process involved 8 rounds, including follow-ups, and emphasized speed, logical problem-solving, and managing ambiguity, even when facing initial setbacks like a no-hire for a syntax error.
Full Experience
I approached the Google L5 interview process with 12 years of experience, coming from a FAANG organization. My journey comprised 8 rounds, including two follow-up coding rounds.
Telephonic Round
This round featured a graph problem, which was a variation of the Course Schedule problem. I completed it within the given time, including a detailed discussion on time complexity, and received positive feedback.
Round 1 (Coding)
The first coding round involved a problem based on streams, where data arrived as strings, and I had to implement mathematical functions based on certain conditions. It was a medium-difficulty question, not found on LeetCode. I solved it in time but made a minor syntactical mistake. Surprisingly, this led to a 'no-hire' feedback, with the interviewer citing a 'struggle in fundamentals,' which felt harsh given the minor nature of the error. The interviewer was also late and seemed unprepared for the round, even asking me which round it was. Sometimes, bad luck can significantly impact the outcome.
Round 2 (Coding)
This round presented a modification of the Parallel Courses problem. I initially considered DFS and Union-Find but quickly solved it using Topological Sort. I haven't found any other solution for it to date. With time remaining, we delved into a detailed discussion of the problem's time complexity and general time complexity for Topological Sort. Despite the interviewer seeming very positive, I received a 'leaning hire' feedback, citing an 'innovative but complex algorithm' as the reason, which again, came as a surprise.
Round 3 (Coding)
The third coding round was a design question involving signed and unsigned integers, with a crucial focus on handling corner cases related to integer overflow. I completed the question in time, discussing correct complexities, and this round resulted in a 'hire' call.
Round 4 (Design)
For the design round, I was given a vague one-liner statement and was expected to generate all the requirements myself. The problem was a subset of designing a system like S3, left open-ended to evaluate my ability to delve into details. We had extensive discussions, covering every layer of the solution, including disaster recovery, availability, and consistency. This was probably my best round, with the interviewer appreciating my detailed coverage multiple times, resulting in a 'hire'.
Round 5 (G&L - Googleyness & Leadership)
Beyond standard behavioral questions, this round involved a deep dive into my past work. I effectively answered cross-questioning on projects I had completed, securing a 'hire'.
Team matching was completed before the Hiring Committee (HC), and I was matched with two teams. However, due to one negative feedback from a prior round, the HC requested two additional coding rounds.
Follow-up Round 1 (Coding)
- I was asked to describe an interesting technical work I had done recently, which led to a detailed discussion for about 15 minutes.
- Then, a design question around randomly arriving TCP packets was posed. I was informed that it couldn't be fully completed in the allocated time, but the core logic was essential.
- A multi-threading discussion around this core logic followed.
Overall, the interviewer was impressed. I presented three different approaches to solve the problem and received a 'hire'.
Follow-up Round 2 (Coding)
- I was asked to explain a technically challenging problem I had solved in my career, which was discussed in detail.
- Following that, a simple counting problem was given, and we delved into the time and space complexity of Java collections. The problem was vague, and the interviewer was looking for an understanding of space-time tradeoffs. I provided the solution, and we moved on.
- Finally, a lengthy backtracking problem, which was on LeetCode but one I hadn't encountered before, was given. The interviewer noted that there wasn't enough time to complete it but wanted to see the core logic. I brought the problem to a logical end where the interviewer was satisfied, and we proceeded to discuss a multi-threading implementation of the solution.
The discussion in this round felt vague, and the context frequently changed. Despite struggling a bit initially, I kept the conversation alive, which helped me immensely. I received positive feedback that made me hopeful for a 'hire', and indeed, it came through.
After re-doing team matching, I ultimately received a 'hire' from the HC for an L5 position. The recruiter was very friendly and shared individual round feedbacks, which helped me learn from my mistakes.
Interview Questions (6)
A problem involving data coming in the form of strings in streams, where the task was to implement specific mathematical functions based on certain conditions derived from the stream data. The question was of medium difficulty and not present on LeetCode.
A design-based coding question focused on handling signed and unsigned integers, with a critical emphasis on managing corner cases related to integer overflow. It was a medium-difficulty problem not present on LeetCode.
Given a one-liner vague statement, I was expected to generate all requirements and design a system that was a subset of a larger system like S3. The problem was open-ended to evaluate the depth of detail I could provide, covering aspects like disaster recovery, availability, and consistency.
Tell me about an interesting technical work you have done recently. This involved a detailed discussion for about 15 minutes.
A design question centered around randomly arriving TCP packets. I was told that a complete solution wasn't expected due to time constraints, but the core logic was required. This was followed by a multi-threading discussion around the proposed core logic.
Tell me about a technically challenging problem you have solved in your career. This involved a detailed discussion of the problem.
Preparation Tips
My preparation involved solving 551 LeetCode problems (60 Hard, 126 Easy, 365 Medium) over a year, focusing heavily on concepts rather than just quantity. This approach helped me tackle questions I hadn't explicitly seen before. Based on my learnings and others' experiences, prioritizing quality over quantity in practice proved beneficial.
Key takeaways from my interview experience that shaped my preparation and approach include:
- Always be ready to generate the problem statement from a vague one-liner; all 8 rounds expected this.
- Google values speed in problem-solving; I received positive marks for speed in all but one round.
- Solutions should be elegant and not overly complex, as complexity can negatively impact feedback in the Hiring Committee.
- Always be prepared to discuss time complexities thoroughly.
- Avoid taking hints; interviewers note every hint given, which can lower your overall rating.
- Use meaningful variable names, as this was positively noted in my feedback.
- Self-test your code before the interviewer points out errors. Even a 10-second pause after coding was noted as a minor concern in my feedback.
- Everything you say is generally noted down and appears in feedback.
- Do not let silence creep in, even if you're struggling to find a solution. Silence can negatively impact your rating.
- Speak up your thoughts instead of jumping to an answer quickly, but avoid silence.
- Finally, I realized that luck is as important as preparation in these processes.
Summary
I had 5 onsite interviews over 3 days for a Test Engineer position at Google in Warsaw. The rounds covered string manipulations, a variation of Number of Islands, basic testing, and 'Googliness'. I feel my interviews went well and am expecting a positive outcome.
Full Experience
After the preliminary rounds, all my 5 onsite interviews were scheduled over the course of 3 days (2 + 2 + 1). Round 1 focused on string manipulations, which was an easy problem if you are comfortable with two-pointer or sliding window approaches. Round 2 presented a slightly variated version of the classic Number of Islands problem. Round 3 involved more string manipulation with two follow-up questions, which started to get tougher. Round 4 was centered on test basics, and finally, Round 5 assessed 'Googliness'. Overall, all my rounds went pretty decently, and I'm currently expecting a positive outcome.
Interview Questions (1)
I was presented with a problem that was a slightly variated version of the classic 'Number of Islands' problem. While the exact variation was not detailed, it would typically involve grid traversal using BFS or DFS.
Summary
I successfully interviewed with Google in Bangalore, India for an L3 Software Engineer role, ultimately receiving an offer after a comprehensive process spanning six rounds in late 2020 and early 2021.
Full Experience
My Google Interview Journey
I am grateful for the LeetCode community's support during my preparation for this interview. My background includes graduating from a Tier 2 college and having 3.5 years of experience at a service-based company. I solved over 200 LeetCode questions, preparing for about 2 months, which was extended due to a COVID-related interview halt.
It's worth noting that I encountered questions I had never seen before during the interview process. The overall process consisted of six rounds:
- 1 DSA Telephonic Round
- 3 DSA Onsite Rounds (conducted on one day)
- 1 DSA + 1 Googleyness Round (conducted on another day)
I've heard they now typically conduct only 3 DSA onsite rounds, though I'm not sure why.
Round 1: Phone Screening | August 2020
The interviewer, from a US office, asked a single LeetCode medium question, which was a tougher version of the 'Decode String' problem. It was quite time-consuming, requiring extensive explanation and thorough understanding. I managed to handle all edge cases, asked appropriate clarifying questions, and completed the solution within the allotted time. The dry run went smoothly, and I later received positive feedback for this round.
Round 2: Onsite Round 1 | September 2020
This round involved two LeetCode Medium/Hard questions, focusing on Linked List and Graph concepts. The interviewer directly jumped into the problems. Despite the questions being challenging, I was able to devise solutions and complete both within the given time. I was particularly happy with my performance here, as I solved a completely new problem effectively.
Round 3: Technical Round 2 | September 2020
An interviewer from India led this round, which felt like a system design discussion intertwined with DSA, specifically centered on string manipulation and processing. I was asked to explain and design the classes I would need. I truly enjoyed this problem, coming up with numerous edge cases, two of which even surprised the interviewer. I felt incredibly satisfied at the end, having designed and explained my solution comprehensively.
I received combined feedback for these three onsite rounds the next day. I had high hopes for superb feedback, especially for this round, and while the recruiter said it was 'good,' I was secretly hoping for 'superb' given my performance. I didn't prepare specifically for a system design round, so I was proud of how I handled it.
Round 4: Technical Round 3 | September 2020
After a brief introduction, the interviewer presented one LeetCode medium question. It was similar to task scheduling, but a tougher variation. I successfully solved it. The feedback for this round, along with Round 1 and Round 3, was all positive, with the first and third rounds being described as 'superb.' This positive outcome led to scheduling the next interviews.
Round 5: Technical Round 4 | September 2020
This round started with a quick introduction before diving into an array-based question, followed by a graph problem. It was a LeetCode Medium question with 4-5 follow-ups, effectively making it 5-6 questions in total. I solved all of them within the time limit and was eager for more challenges. I loved this question and distinctly remember my confidence in quickly finding solutions.
I received 'all positive and superb' feedback for this round.
Round 6: Googleyness | September 2020
The final round consisted of questions about my projects and various hypothetical situations. I believe I answered them well, and the feedback was mostly positive.
Following these rounds, I moved to the team matching phase, and eventually, my packet reached the Hiring Committee (HC), leading to an L3 offer.
I must admit, while thrilled to join Google, I felt a bit disappointed about the L3 level. At my previous company, I was an SDE2 and on track for a senior role. I had initially hoped for an L4 profile at Google. The recruiter had mentioned that the HC determines the level, but I continued to inquire about it during our calls. I put in immense effort and genuinely believe I could have achieved L4 if the interview process differentiated based on level, which it generally doesn't. My interviews were all strong, receiving positive responses. Nevertheless, Google was my dream company, so I accepted. I'm doing well here and am committed to working hard and being happy.
My advice is to always clarify with your recruiter about the levels they are evaluating you for. Knowing this upfront can help manage expectations, even if there's a possibility of a downgrade. Thank you again, LeetCode community, for being so amazing and supportive!
Interview Questions (2)
I encountered a problem that was described as a tougher version of the 'Decode String' LeetCode problem. It was a single, time-consuming medium-difficulty question from a US-based interviewer, requiring explanation, checking understanding, and handling all edge cases.
This Googleyness round focused on behavioral aspects, including discussions about my past projects and how I would handle various hypothetical scenarios.
Preparation Tips
My Preparation Tips
My most important tip is that anyone can become a Googler. If I could do it, you certainly can too. It's fundamentally about consistency, hard work, and maintaining motivation. Solving Data Structures and Algorithms (DSA) problems is indeed the path to success.
Be consistent in your preparation. Aim to solve at least one coding question every day. Don't fall into the trap of thinking certain topics are more important than others; every question is valuable, and what you get depends entirely on your interviewer.
Practice coding under time constraints. Time management is crucial; if you spend too much time explaining, you won't have enough time to code efficiently. Lastly, I highly recommend doing mock interviews. If possible, practice with a friend who can provide valuable feedback. If not, record yourself and pretend you're interviewing with a Googler, then critically evaluate your own performance.
Summary
I successfully interviewed for an L5 Software Engineer position at Google Cloud in Seattle, WA. The process involved a phone screen, a virtual onsite with three coding rounds, a behavioral interview, and a system design interview, culminating in an offer after team matching.
Full Experience
I underwent a standard interview process for an L5 Software Engineer role at Google Cloud in Seattle, WA. The process, conducted virtually due to COVID, began with a 45-minute phone screen focused on a coding problem. Following this, I proceeded to a full virtual onsite, which comprised three 45-minute algorithmic interviews, a 1-hour behavioral interview, and a 45-minute system design interview.
After the onsite, my recruiter informed me that I was well-received, but still needed to clear team matching and the Google Hiring Committee. Over the next two weeks, I participated in several team match interviews, finding many teams appealing. Simultaneously, I received approval from the Hiring Committee, and an offer followed about a week later.
At the time, I was also interviewing with other companies like Amazon, but I found Google's interview process to be exceptionally well-organized and positive. Every segment started promptly, interviewers were consistently friendly, and the overall experience was excellent. Despite this being my first time interviewing with Google, it went remarkably smoothly. I believe my competitive programming background, combined with 8 years of professional experience, including time at two Silicon Valley companies, gave me a considerable advantage.
Interview Questions (4)
A coding problem requiring the implementation or application of a binary search algorithm.
A graph problem requiring the application of a topological sort algorithm.
A graph problem requiring the application of Dijkstra's algorithm to find the shortest path.
A problem that could be solved using dynamic programming techniques, as the candidate's solution for it was dynamic.
Preparation Tips
My preparation largely leveraged my background in competitive programming, which I found to be a significant advantage. Additionally, my 8 years of professional experience, particularly at two Silicon Valley-based companies, contributed to my readiness.
Summary
I interviewed for a Software Engineer L4 position at Google in NYC in September 2020. Despite a rigorous interview process involving a phone screen and a five-round virtual onsite, I ultimately received a rejection.
Full Experience
My interview journey for the Google SWE L4 role started with a phone screen, which involved a coding problem. Following that, I was invited for a virtual onsite, consisting of five 45-minute rounds. These rounds covered a mix of coding challenges, a behavioral interview focusing on 'Googliness,' and other algorithmic problems. Each coding round presented unique challenges, from dynamic programming to graph-related problems. Unfortunately, after completing all rounds, I was informed that I would not be moving forward with the hiring process.
Interview Questions (6)
Given a 10-sided die (d10) and a starting value, what is the probability of busting (getting over 21) under specific rules: if the current sum is 16 or lower, one must roll; if the sum is 17-21, one must stay.
The round consisted of two parts. Part 1: Determine if two given numbers are anagrams of each other. Part 2: Given a list of numbers, find the smallest number from the list that does not have an anagram pair within the same list.
This round focused on behavioral questions, often referred to as 'Googliness', assessing leadership, teamwork, handling ambiguity, and how I demonstrate Google's core values.
Given a 2D grid containing a starting position, an ending position, and several obstacles, find a path from the source to the destination such that the minimum distance maintained from any obstacle along this path is maximized.
Summary
I interviewed for a Software Engineer L4 position at Google in Bangalore and successfully received an offer after multiple technical and behavioral rounds, spanning coding, system design, and leadership principles.
Full Experience
My interview journey for a Software Engineer L4 position at Google in Bangalore began in April Mid with preparation, leading to the actual interviews from late June to late July 2020. All rounds were 45 minutes and conducted on Google Meet due to the Covid situation.
Screening Round – June 26, 2020 (45 minutes)
This round consisted of two questions. I don't recall the first one, but it was an easy problem. The second was a medium-level array question related to a triangular array, solvable using a two-pointer approach and a hashset. It had multiple follow-ups, requiring operations on a single array input within a class. I quickly coded all scenarios, but realized my initial code was messy and rewrote it for clarity. The interviewer was interactive, offering feedback and asking probing questions about my validation approach, which I thoroughly enjoyed.
Round 1 – Technical – July 13, 2020 (45 Minutes)
The interviewer presented a string manipulation problem where an original and an edited string were given under certain constraints. It was harder than Rearrange Words in a Sentence but easier than Substring with Concatenation of All Words. After some thought, I developed a solution with linear complexity and handled all invalid edit scenarios. I dry-ran my code, catching and fixing a couple of small bugs. Although the interviewer initially struggled to understand the second half of my solution, I confidently explained it, and he later asked me to check for a tactical mistake, which I quickly resolved. This interviewer was interactive but didn't give hints about his satisfaction with my solution.
Round 2 – Googleyness & Leadership – July 14, 2020 (45 minutes)
For this round, I had prepared by discussing general questions with friends and noting down key details about my projects, achievements, failures, and weaknesses. Most questions were scenario-based, such as "a project where I excelled" or "a time I had a conflict." My preparation helped me recall details and structure my answers effectively. This was a very interactive and enjoyable round, feeling more like a conversation with a colleague. The interviewer's positive reinforcement made me feel very confident about my performance.
Round 3 – Technical – July 14, 2020 (45 Minutes)
I was given a very hard string problem related to Suffix Trees, though it couldn't be directly solved using a suffix tree. I quickly provided a brute-force solution and its complexity before attempting an optimized one. I managed to come up with an O(n^2) solution and asked if further optimization was needed. The interviewer encouraged me to try more, so I spent a few more minutes before he asked me to code the O(n^2) solution, which I did efficiently and dry-ran. For the last 15 minutes, I continued to explore ways to optimize, finding some solutions that improved complexity in certain cases but not the worst-case. The interviewer was largely silent throughout, providing no hints. At the end, he confirmed it was hard to find a linear complexity solution, which relieved me, knowing my O(n^2) approaches were sufficient.
Round 4 – Technical – July 20, 2020 (45 Minutes)
This round started with a matrix problem requiring two different operations, not a DP path problem. After some thought, I devised solutions for the scenarios with linear and constant complexity respectively. I explored optimization approaches to avoid linear complexity for the first scenario but received no feedback from the interviewer. With only 20 minutes left, I moved to coding, designing a class with methods for different scenarios. I took the freedom to design the class as I saw fit, adding comments and basic operations like initialization and invalid case handling. After completing the core functionality, I confirmed with the interviewer and filled in the invalid case handling. This interviewer was also very silent, and I had to drive the entire round without much guidance on whether to focus on optimization, class design, or code clarity.
Round 5 – Technical – July 20, 2020 (45 minutes)
I faced another matrix grid problem with a complicated statement that took some time to fully grasp. After discussion, it became clear it was a graph shortest path finding problem, similar to Optimize Water Distribution in a Village. I explained my solution with test cases and complexity, and the interviewer seemed satisfied, asking me to code it. I successfully coded the problem, ran test cases, and the interviewer was pleased with the result. This interviewer was helpful in clarifying the problem statement with examples and offering hints when I strayed off course.
Interview Questions (4)
Given a triangular array, perform multiple operations. The problem can be solved using a two-pointer approach and a hashset. It included follow-ups and required implementing a class to handle operations on a single array input.
Given an original string and an edited string with some constraints, determine the process or transformation. The problem is harder than 'Rearrange Words in a Sentence' but easier than 'Substring with Concatenation of All Words'.
A very hard string problem, related to Suffix Trees, though it cannot be directly solved using a suffix tree. I started with a brute-force solution, then optimized it to O(n^2) complexity. The interviewer asked for further optimization, but a linear complexity solution was noted as very difficult to find.
A complex matrix grid problem that, after discussion, transformed into a graph shortest path finding problem. Similar in concept to Optimize Water Distribution in a Village.
Preparation Tips
Preparation Strategy
I began my preparation in mid-April, dedicating about two months before my screening round. My strategy involved:
- Revising all data structures.
- Attempting LeetCode questions after completing each data structure.
- Practicing top questions from LeetCode.
- Giving around 15-20 mock interviews.
By the final interview, I had solved over 200 LeetCode questions, with a ratio of 40% Easy, 50% Medium, and 10% Hard. Instead of solving many questions of the same pattern, I focused on 1-2 questions for each different pattern. I found useful links about patterns on LeetCode Discuss.
Mock Interviews
- I asked a friend working at Google to conduct one mock round when I felt prepared.
- For the remaining mocks, I primarily used LeetCode's online assessments for Google, Facebook, Amazon, and random company interview sets.
Suggestions for Approaching Problems (Google Meet Specific & General)
For Google Meet Rounds:
- Practice writing code in Google Docs; it's more challenging than paper due to indentation issues.
- If you need to draw or visualize, ask if you can use paper and show it on screen. I did this in some of the rounds.
General Problem-Solving Approach for Google:
The path to the solution is crucial. A perfect algorithm might not suffice without a good thought process.
- Understand the Problem: Clarify edge cases and expected outputs with the interviewer.
- Think Out Loud: Share your thought process, even if unsure. This helps the interviewer guide you if you're off track.
- Start Simple, then Optimize: Begin with a basic approach and then iteratively think about optimizations.
- Code with Edge Cases: Ensure your code covers all edge cases.
- Review/Dry Run: Always review and dry-run your code with test cases before declaring it complete; this helped me find most bugs.
- Don't Give Up: Keep trying and thinking until the very end, even if you don't reach a perfect solution.
Data Structures Covered
I covered a wide range of data structures:
- Array, Vector, List
- Priority Queue (MinHeap, MaxHeap)
- Stack
- Set (Hashset, TreeSet, LinkedHashSet), Multiset/MultiMap
- Map (Hash, Tree, LinkedHash)
- Pair
- Tree (Binary tree, n-ary tree, complete tree, segment tree, red-black tree, AVL tree, Trie)
Algorithms Covered
Key algorithms included:
- Binary Search
- Two Pointer
- BFS/DFS
- All Tree-related algorithms (PreOrder, PostOrder, InOrder, recursive/iterative solutions) and implementations of the mentioned tree types.
- Graph algorithms (Min spanning tree, Shortest path, etc.)
- Trie, Suffix tree
- String manipulation algorithms
- Union Find (with different ways to find cycles in a graph)
- Dynamic Programming patterns and algorithms
Summary
I recently completed an L4 onsite interview at Google, which unfortunately resulted in a rejection. My performance highlighted areas for improvement, particularly in coding speed and optimizing solutions efficiently during the rounds.
Full Experience
I recently completed an L4 onsite interview at Google, and unfortunately, it ended in a rejection. This experience taught me valuable lessons, especially about time management and coding efficiency. I realized I took too much time initially trying to understand and optimize problems on the whiteboard before even writing any code. I also struggled with the speed required to write correct, bug-free code quickly, a skill I now recognize as a distinct 'muscle' that needs dedicated practice. Knowing basic algorithms by heart for quick implementation, like recursions, DFS, BFS, quicksort, and mergesort, would have been a huge time saver. I also understood DP quickly but couldn't write the solution fast enough. Despite acing the SDI and Googlyness aspects, my performance on the coding problems was not up to par due to these issues.
Interview Questions (2)
You are given an infinite number of dice and you want to represent numbers with them. A represented number is lining up dice faces to make up the number, so 11 is 2 dies of faces 1 and 1, 15 is one '1' facing die and one '5' facing die. A number can only be represented fully or be a sum of fully represented numbers. For example:
- 66 can be represented fully
- 82 cannot as we don't have a die face for '8' so we have to find a number that sums to 82 and is made up of representable number, so 82 can be 66 + 16 and that would be the correct representation
You need to find the path with the largest sum in a matrix, but you cannot go back or diagonally. There are barriers of 0s along the way. The matrix also has no cycles, so you cannot go back to a number from another number.
Example:<br/>[1,2,3,4,5]<br/>[0,2,0,0,9]<br/>[1,6,7,0,0]<br/>[0,8,0,0,10]<br/>
This is a DP problem.
Preparation Tips
My preparation involved solving 127 LeetCode problems over three months. I focused on understanding basic algorithms like recursion, DFS, BFS, quick sort, and merge sort, aiming to implement them quickly and flawlessly. I also worked on dynamic programming concepts. However, I realized I needed more practice in writing bug-free code at speed, which I believe is a different skill set than just understanding the algorithms. I now plan to practice writing correct and bugless code as quickly as possible, either by re-solving familiar problems or tackling very easy ones, to build this crucial muscle.