google logo

Google Interviews

241 experiences6,350 reads802 questions12% success rate
Google OA/Phonescreen [L4] - 24 Dec 2025
google logo
Google
Ongoing
December 24, 202569 reads

Summary

I recently completed my Online Assessment and Phonescreen for a Software Engineer L4 role at Google, facing three distinct algorithmic challenges.

Full Experience

I recently participated in the Google Online Assessment and a subsequent Phonescreen round for a Software Engineer L4 position. The OA presented two challenging algorithmic problems: one involving dynamic programming with modular arithmetic and the other a tree-based problem requiring subtree sum calculations. The Phonescreen round then focused on an interesting design problem related to playlist shuffling to minimize adjacent artists. I was able to approach all problems and provide solutions.

Interview Questions (3)

Q1
Count Ways to Select K Coins with Sum Divisible by M
Data Structures & AlgorithmsHard

There are N coins valued (0 to N - 1). Calculate no. of ways to select K coins such that their sum is divisible by M. Return answer modulo 1e9 + 7.

int solve(int N, int M, int K)

Input:
4 2 2
Output: 2

Constraints:
1 <= N, M, K <= 10^3

Q2
Min Town Sum Difference After Edge Deletion in Tree
Data Structures & AlgorithmsMedium

Given tree graph with N nodes/regions (1 to N) and (N - 1) bidirectional edges/roads. Each node/region (i + 1) has no. of towns denoted by towns[i]. Calculate min difference in total sum of towns between resulting components when you delete one edge.

int minTownsDiff(int N, vector& towns, vector<vector>& roads)

Input:
2
10 20
1 2
Output: 10

Constraints:
1 <= N <= 10^5
1 <= towns[i] <= 10^4

Q3
Shuffle Playlist to Minimize Adjacent Artists
Data Structures & AlgorithmsMedium

Given a playlist of songs. Implement a shuffle function, such that there is no/minimal adjacent artists.

using Song = pair<string, string>; // (artist, song)
void shuffle(vector<Song>& playlist)

Input:
[ { "artist": "A", "song": "apple" }, { "artist": "A", "song": "banana" }, { "artist": "B", "song": "orange" }, { "artist": "B", "song": "guava" }, { "artist": "C", "song": "mango" } ]
Output: ABABC

Google Interview Experience L4 | More rounds/Rejected
google logo
Google
Rejected
December 17, 202542 reads

Summary

Had a Google interview experience at the L4 level, with 2 technical rounds and 1 Googliness round. Despite a strong performance in the first technical round, the second round had issues with data structure selection, leading to potential rejection or additional rounds.

Full Experience

Started with an HR call that covered basic time and space complexity questions. The telephonic screening began with a sliding window problem involving fountains and safe places. I explained a brute force solution and then moved to an optimized approach using a monotonic stack and next greater element concepts. However, I couldn't fully fix the bug in the optimized solution.

The interview structure included 2 technical rounds and 1 Googliness round. The first technical round went well with a problem similar to Merge Intervals, solved in 15–30 minutes, and a follow-up question about finding Maximum among Minimums using a Deque in Java. The interviewer was satisfied but noted we didn't have time to code the solution.

The second technical round was challenging. The problem involved determining if a server times out based on RPC logs with timestamps. I implemented an optimal solution using a HashMap to track start events and check timeouts. However, the interviewer wanted a different approach involving a LinkedHashMap to manage insertion order and timeouts efficiently. I could only explain my idea in pseudocode, which led to a poor performance in this round.

The Googliness round went well, similar to Amazon's behavioral rounds. The outcome was uncertain, with feedback indicating an incorrect data structure choice in one of the technical rounds, possibly leading to rejection or additional rounds.

Interview Questions (3)

Q1
Find Safe Places in Fountain Array
Data Structures & Algorithms

Given two arrays, return the safe places. The problem involved determining safe positions based on fountain coverage.

Q2
Merge Intervals with Maximum Among Minimums
Data Structures & Algorithms

Problem was similar to Merge Intervals, but with an additional requirement to find the maximum among minimums. The solution required an optimal approach using a Deque in Java.

Q3
Detect Server Timeout from RPC Logs
Data Structures & Algorithms

Given start and end logs of RPC server events with timestamps, return true as soon as a server times out. If no server times out after processing all logs, return false.

Google Coding round | L5 | Bangalore
google logo
Google
SDE IIIBangaloreOffer
December 15, 202540 reads

Summary

During my Google L5 coding interview in Bangalore, I was presented with a complex grid traversal problem that required finding the shortest path while maximizing distance from zombies. The problem was similar to a LeetCode challenge but with unique constraints.

Full Experience

I was asked to solve a problem where I had to navigate a grid with zombies, walls, and open paths. The main challenge was to find the shortest path to the gate while staying as far away from zombies as possible. The problem required a custom approach to prioritize safety while maintaining path efficiency.

Interview Questions (1)

Q1
Find the Safest Path in a Grid
Data Structures & AlgorithmsHard

Given a grid representing a maze with various obstacles, the task is to find the shortest path from the start to the gate while staying as far away from zombies as possible. The grid contains walls, zombies, open paths, and a start and gate position.

Google Interview Experience SDE-1
google logo
Google
SDE-1Rejected
December 15, 202528 reads

Summary

I recently interviewed with Google for a software engineering role, completing a phone screen and three challenging onsite DSA rounds. Despite strong performance in most rounds, I ultimately received a rejection, believing my second DSA interview was the deciding factor.

Full Experience

I applied for a software engineering role through Google’s career portal. After two weeks, I received a call from the recruitment team. We had a brief 15–20 minute discussion covering my background, soft skills, projects, current role, and salary expectations to assess my basic fit for the position. Following this, I filled out a candidate form. The next day, they explained the complete interview process and shared preparation resources for Data Structures and Algorithms (DSA). As a working professional focused on development, I requested two weeks to refresh my DSA fundamentals, which was approved. After 1.5 weeks, they checked on my progress and scheduled my Preliminary Phone Screen.

📞 Preliminary Phone Screen (45 mins)

The interview was conducted on Google Meet and lasted 45 minutes. The question type was Medium–Hard, specifically involving Trees. The process was structured:

  • 5 mins: Understanding the problem
  • 15 mins: Discussing the approach and edge cases
  • 20 mins: Coding on the whiteboard
  • 5 mins: Complexity analysis and wrap-up

I successfully handled all edge cases and optimized my code. The interviewer seemed happy and provided positive feedback, leading to my shortlisting for the Onsite (Online) rounds.

💻 Onsite Interviews (3 DSA Rounds in One Day)

Round 1 — DSA (Google Germany)

This round focused on Directory structure creation (Design + Edge cases) and was rated Medium difficulty. I provided an optimized solution quickly, clearly explaining my choice of data structures and handling follow-ups effectively. I confidently discussed time and space complexities. Although I couldn’t complete a follow-up question due to time constraints, I explained my approach clearly. This round went very well, and the interviewer was satisfied.

Round 2 — DSA (Google India)

This was a complex and tricky Graph Problem, rated Hard. The round started with a discussion about my projects. It took me 10–12 minutes to fully understand the question. Initially, I proposed a suboptimal approach, but after discussion, I found the optimal solution. Unfortunately, time ran out before I could complete the full implementation. The interviewer seemed unsatisfied with the outcome of this round.

Round 3 — DSA (Google California)

This round presented a Hard problem involving Strings. I discussed my approach thoroughly, identified failure cases, and refined my logic. I managed to write complete working code with 10 minutes remaining and confidently answered most follow-up questions. The interviewer was happy with my overall solution.

📬 Final Result

Two weeks after the onsite interviews, I was informed that I did not make it to the next stage. I believe the second interview was the deciding factor in my rejection.

💡 Reflection

Despite the rejection, the entire process was an incredible learning experience. I gained insights into Google’s structured and professional interview process, the critical importance of clear communication and handling edge cases, and the ongoing need to stay consistent with DSA, even while working in development-heavy roles. I am grateful for the opportunity and am looking forward to preparing better for my next attempt.

Interview Questions (1)

Q1
Design Directory Structure with Edge Cases
Data Structures & AlgorithmsMedium

Design a directory structure, considering various edge cases and providing an optimized solution. Be prepared to explain your choice of data structures and confidently discuss time and space complexities for operations.

Preparation Tips

I requested two weeks to refresh my DSA fundamentals. The recruitment team also provided preparation resources specifically for Data Structures and Algorithms. My reflection highlighted the importance of staying consistent with DSA, even while focused on development-heavy roles.

Google Europe L3 | Interview Experience
google logo
Google
software engineer l3europe1 yearsOngoing
December 11, 2025114 reads

Summary

I interviewed for a Software Engineer L3 position at Google Europe and received very strong feedback across all rounds, leading to the team matching phase. While I was considered for L4, I ultimately proceeded with L3.

Full Experience

I recently interviewed for a Software Engineer L3 position at Google Europe. I have 1 year of experience and graduated from IIIT in 2024, with a LeetCode rating of 2500+.

Phone Screen

The problem presented was to count ordered pairs (i, j) in an array arr such that a[i] - a[j] = i - j, with 0 ≤ i, j < n. Important notes included that (i, j) and (j, i) are different, and (i, i) is also a valid pair. Examples were provided to clarify the problem. The verdict for this round was 'Position', though the recruiter didn't share exact feedback.

Onsite Round 1

In this round, I was given a directed graph where each edge has a security level. The task was to find a path from a startNode to an endNode such that the maximum edge security level in that path is minimized. I received a 'Strong hire' verdict for this round.

Onsite Round 2

The problem here involved splitting a given data size into the minimum number of packets, with each packet having a maximum capacity. If multiple solutions had the same minimum number of packets, I had to choose the one where the maximum packet size among all packets was minimized. This round also resulted in a 'Strong hire' verdict.

Onsite Round 3

This round presented a problem with a list of events, sorted by timestamp, each having a unique ID and timestamp, along with a timeout value. I needed to determine if there was any event where end_time - start_time > timeout. Follow-up questions included implementing an O(1) space solution and handling scenarios where events were stored in single or multiple files. I received a 'Strong hire' for this round as well.

Onsite Round 4 (Googlyness)

This round consisted of behavioral questions. All the questions asked were sourced from a frequently asked Googlyness questions post on LeetCode. I received a 'Strong hire' for this round.

Overall, my feedback across all rounds was very strong. My recruiter even considered me for an L4 position, but one interviewer felt I wasn’t the right fit for that level, so I am proceeding with L3. It was a great experience, and I am currently in the team matching phase.

Interview Questions (4)

Q1
Count Ordered Pairs with a[i] - a[j] = i - j
Data Structures & Algorithms

You are given an array arr. Count the number of ordered pairs (i, j) such that:

a[i] - a[j] = i - j where 0 ≤ i, j < n

Important notes:

  • (i, j) and (j, i) are counted as different.
  • (i, i) is also a valid pair.

Examples:

Input: [2, 4, 6, 5, 9, 9, 11]
Output: 13

Input: [1, 2, 3]
Output: 9

Explanation for [1, 2, 3]:

  • For index 0 → 3 valid pairs
  • For index 1 → 3 valid pairs
  • For index 2 → 3 valid pairs

Total = 9

Q2
Minimize Max Edge Security Level Path in Directed Graph
Data Structures & Algorithms

You are given a directed graph where each edge has a security level.

For any path from startNode to endNode, the security level of the path is:

max(edge security levels in that path)

Find the path from startNode to endNode whose security level is minimized.

Q3
Minimize Packets and Max Packet Size
Data Structures & Algorithms

You are given a data size and must split it into a minimum number of packets, where each packet has a maximum capacity.

If multiple solutions require the same number of packets, return the one where:

the maximum packet size among all packets is minimized.

Q4
Event Timeout Check with O(1) Space
Data Structures & Algorithms

Given a list of events sorted by timestamp.

Each event has a unique ID and timestamp, and you are also given a timeout value.

Determine if there exists an event where:

end_time - start_time > timeout

Follow-ups:

  • Implement a solution with O(1) space complexity.
  • What if events are stored in files instead of memory?
  • What if the events are split across multiple files?

Preparation Tips

I prepared for the interview leveraging my 2500+ LeetCode rating. For the Googlyness round, I referred to the frequently asked questions outlined in this LeetCode post.

Google ng code interview experience
google logo
Google
Offer
December 10, 202523 reads

Summary

Had a Google ng code interview experience where I faced a classic problem on subarray sum equals K, showcasing the importance of understanding prefix sums and hash maps for optimization.

Full Experience

The interviewer started off very chill — after a bit of small talk, he jumped straight into the questions. The first one was a classic high-frequency problem: Subarray Sum Equals K. Given an integer array, find the number of continuous subarrays whose sum equals K. The moment you hear this question, you know they’re not testing algorithms per se — they’re checking whether you can start with a brute-force solution and progressively optimize it. The student first mentioned the brute-force approach with O(n²) complexity. The interviewer smiled, nodded, and then asked: "if I asked you to optimize it to O(n), how would you think about it?" At that moment, our voice-assist system hinted: "Explain the prefix-sum + hashmap idea, don’t rush into coding yet." So the student naturally followed up with: "I’d use a hash map to record how many times each prefix sum has appeared. While iterating, I check whether prefixSum – K exists — that tells me how than subarrays ending at the current index sum to K." He then explained and wrote the solution step by step, even adding the important detail of initializing the map with {0: 1} to correctly handle cases where the subarray from index 0 already equals K. The interviewer immediately responded: "Good, that’s the reasoning I’m looking for."

Interview Questions (1)

Q1
Subarray Sum Equals K
Data Structures & Algorithms

Given an integer array, find the number of continuous subarrays whose sum equals K.

Google swe sre Onsite round 1
google logo
Google
swe sre
December 9, 202520 reads

Summary

I had an onsite interview for the SRE role at Google, where I was tasked with designing and implementing file system utility functions, including a crucial follow-up to delete an entire directory tree.

Full Experience

I recently had my first onsite interview round for the Software Engineer, Site Reliability Engineer (SRE) role at Google. The interview focused heavily on file system operations and design. I was initially asked to implement several core file system utility functions, which served as building blocks for a more complex problem. The primary challenge involved efficiently deleting a directory tree.

Interview Questions (2)

Q1
File System Utility Functions
Data Structures & Algorithms

Implement the following file system utility functions which could be used to interact with a file system:

  • fs.GetDirectoryChildren(path): Given a path to a directory, return a list of its immediate children (files and subdirectories).
  • fs.Delete(path): Delete a file or an empty directory at the given path.
  • bool fs.IsDirectory(path): Determine if the given path corresponds to a directory.

Q2
Delete Directory Tree
Data Structures & Algorithms

As a follow-up, implement the function deleteDirectoryTree(path). This function should recursively delete a directory and all its contents (subdirectories and files) starting from the given path. You should leverage the previously defined file system utility functions like GetDirectoryChildren, Delete, and IsDirectory to achieve this efficiently.

Google Poland L4 Interview experience.
google logo
Google
PolandRejected
December 4, 2025123 reads

Summary

I interviewed for an L4 Software Engineer role at Google Poland, going through a comprehensive process including technical and behavioral rounds. Despite feeling positive about my performance, particularly in problem-solving and coding, I was ultimately rejected without specific feedback, which left me disheartened.

Full Experience

I was reached out to by an HR on LinkedIn for an L4 Software Engineer opportunity in Poland and scheduled an initial call.

1. Initial HR Call (30 mins)

This call covered basic questions about my language preferences and my revision timeline. Following this, a screening round was scheduled.

2. Screening Round (45 mins)

I was given a problem involving encoding and decoding a Directed Acyclic Graph (DAG), with a follow-up to include cycles. I made sure to ask clarifying questions, create examples, and consider edge cases. I thought out loud, explaining my approach verbally while writing clean, properly indented code with appropriate methods. After completing the solution for DAGs, I performed a dry run and discussed how to extend it for cycles. The interviewer seemed satisfied, and two weeks later, I received a call to schedule further interviews. Two DSA rounds and one Googleyness round were scheduled for about 20 days later.

3. Round One - DSA (45 mins)

The interviewer presented a parking lot problem. I needed to design a system given an array of pairs (vehicleType, slots) and another array of pairs (vehicleType, costPerMin). Three functions were provided to implement:
initialize(vector<pair<string, int>> slotsPerType, vector<pair<string, int>> costPerMinPerType);
bool onEnter(string plateNumber);
int onExit(string plateNumber); // returns calculated cost & -1 otherwise
As before, I asked clarifying questions, thought aloud, and wrote clean, modular code with proper indentation, explaining each line. I created an example, performed a dry run, and covered edge cases. The interviewer then asked me to write unit test cases. I wrote some tests in the main method and iterated over them to verify the functionality of the three methods. The interviewer acknowledged the code was fine but commented, 'I was expecting you to write unit test cases and end to end code but the time was over.' This felt awkward, and I later emailed the HR about the feedback.

4. Round Two - DSA (45 mins)

For this round, I was asked to create a custom LinkedList that would store three pieces of information: value, a pointer to the next node, and a string containing a hash of the current value as well as the hash of the next node's hash. If the next node didn't exist, its hash should be considered an empty string. I again asked clarifying questions, created an example, thought out loud, and wrote clean, properly indented code while explaining my thought process. I implemented a LinkedList class and a Node class, including an addNode function. The interviewer then asked me to write a function to validate the linked list, returning false if any node's hash value was tampered with, and true if all nodes' hashes were valid. I coded this function, and the interviewer seemed happy. We ended the round discussing the onboarding process.

5. Round Three - Googleyness (45 mins)

This round involved several behavioral questions. I felt I handled them well, engaging in back-and-forth discussions, and the interviewer seemed content.

Verdict

The very next morning, I received a call from Google. The recruiter asked for my feedback first, then informed me that I would not be moving forward this time and that there's a 12-month cool-down period before I could reapply. When I asked for specific feedback, I received a generic reply: 'I do not have a feedback but in general, I would suggest keep doing what you were doing and keep practicing DSA and coding then apply again after 12 months.' I pressed for areas to focus on, but he reiterated that he had no specific feedback. Later, I asked him if the decision was from the hiring committee, given that decisions usually take 7-10 business days. He replied that 'it was a team decision not from the hiring committee.' The entire experience felt terrible in the end.

Interview Questions (3)

Q1
Encode/Decode DAG with Cycles
Data Structures & Algorithms

I was given a question on encoding and decoding a Directed Acyclic Graph (DAG). The follow-up involved extending the solution to include cycles as well. I clarified the problem, created examples, thought out loud, and wrote clean, properly indented code. I also performed a dry run and discussed how to handle cycles.

Q2
Parking Lot System Design
Data Structures & Algorithms

I was presented with a parking lot design problem. I needed to implement a system that manages parking slots based on vehicle types and calculates costs. The problem provided three function signatures: initialize(vector<pair<string, int>> slotsPerType, vector<pair<string, int>> costPerMinPerType), bool onEnter(string plateNumber), and int onExit(string plateNumber) (which returns the calculated cost or -1). I asked clarifying questions, thought out loud, wrote clean code, created an example, and dry-ran the solution covering edge cases. I also wrote unit tests.

Q3
Tamper-Proof Linked List Validation
Data Structures & AlgorithmsMedium

I was asked to create a custom linked list where each node stores a value, a pointer to the next node, and a string containing the hash of the current value as well as the hash of the next node's hash. If the next node doesn't exist, its hash should be considered an empty string. Subsequently, I needed to implement a function to validate the linked list, returning false if any node's hash value is tampered with, and true if all nodes' hashes were valid.

Google L3 - Technical Phone Screening - 2025 Nov
google logo
Google
SDE IOngoing
November 28, 202584 reads

Summary

I recently underwent a Google L3 Technical Phone Screening where I was presented with a unique problem involving matching digits from a Pi sequence to their corresponding indices. The problem required careful handling of single and multi-digit index matching rules, and I discussed the approach and some initial challenges with the interviewer.

Full Experience

I had my Google L3 Technical Phone Screening yesterday, and I wanted to share my experience with the community. The interviewer presented a rather intriguing and somewhat abstract problem. It involved a sequence of Pi digits and their 1-indexed positions. The core task was to find indices where the digits of the index itself matched the Pi digits at those positions. For instance, if the index was 13, I had to verify if Pi[13] was 3 and Pi[12] was 1. This required a careful parsing strategy.

Initially, the interviewer only provided the Pi sequence up to index 9, which made it tricky to consider edge cases involving two-digit indices (like 10, 11, etc.) properly. They eventually provided a hint about the range, but I found that aspect of mapping index digits to Pi digits a bit confusing at first.

For the implementation, I was given the freedom to choose the input parameter's data type, and I opted for a String. I thought this would simplify working with individual characters and their conversion to integers. However, I did make a mistake early on by trying something like pi[i].toInt() directly. I haven't received any feedback on the interview yet, but I'm eager to see the outcome and will update this post once I do.

Interview Questions (1)

Q1
Match Pi Digits to Indices
Data Structures & AlgorithmsMedium

You are presented with a sequence representing the digits of Pi, indexed starting from 1:

Pi:    3  1  4  1  5  9  2  6  5  3   5    1   3   4
Index: 1  2  3  4  5  6  7  8  9  10  11  12  13  14

The value of Pi is given to be up to 106, implying that indices can extend up to that range. The goal is to identify and output specific index values based on a matching rule. For instance, if the target "Pi value" is 10^6, the expected output is 5, 13.

Example Explanation for Output 5, 13:

  • For index 5: The digit at Pi[5] is 5, which matches the index value 5.
  • For index 13: This requires matching the digits of the index 13 with the corresponding Pi digits. The last digit of 13 is 3, which matches Pi[13]. The preceding digit of 13 is 1, which matches Pi[12]. Therefore, 13 is a valid match.

The core task is to implement a function that takes a parameter (type chosen by candidate, I chose String) and identifies all such matching indices based on the rule: an index k is a match if each digit of k (read from right to left) matches the Pi digit at the corresponding position (e.g., for index XY, Y matches Pi[XY] and X matches Pi[X]). The interviewer initially provided a truncated Pi sequence (up to index 9), which made it challenging to immediately identify edge cases involving multi-digit indices.

Google Apprenticeship SAD || GOC + Phone round
google logo
Google
Apprenticeship SADRejected
November 26, 2025106 reads

Summary

I interviewed for a Google Apprenticeship SAD role, which included an Online Challenge with two DSA questions and a phone call. Despite solving the coding problems effectively, I was ultimately deemed ineligible for the role due to my current student status, as it's intended for degree holders seeking a career shift.

Full Experience

I participated in the Google Apprenticeship SAD interview process, which commenced with a Google Online Challenge (GOC). During the GOC, I faced two data structures and algorithms questions. The first was an easy-level LeetCode problem, though with tricky framing: I had to pair lengths and breadths from two given arrays to form rectangles, with the goal of maximizing (or minimizing, I don't recall exactly) the total sum of the squares of the diameters of all the circumcircles around these rectangles. The second question was a medium-level dynamic programming problem: given a binary array, I needed to count the number of subarrays of a specified length 'x' that contained contiguous 1's. I successfully solved both questions within 25-30 minutes.

Following the GOC, I received a phone call from a Google recruiter. Although I initially couldn't chat as I was out, I later scheduled a formal meeting. Interestingly, the person who contacted me initially was different from my eventual interviewer. During the phone interview, I was first asked to introduce myself. Subsequently, I was informed that I was not eligible for the role because it's designed for individuals who already hold a degree and are looking for a career shift, rather than for those currently pursuing undergraduate studies or still in college. The interviewers were very polite and clearly explained the eligibility criteria for the role. Overall, it was an interesting experience.

Interview Questions (3)

Q1
Maximize/Minimize Sum of Squared Circumcircle Diameters
Data Structures & AlgorithmsEasy

You are given two arrays, one containing the lengths and the other breadths. You have to pair up one length with one breadth to form a rectangle. You need to make the pairs such that the total sum of the square of the diameter of all the circumcircles formed around the rectangle is maximized (or minimized, I don't remember).

Q2
Count Subarrays with Contiguous Ones of Length X
Data Structures & AlgorithmsMedium

There is a binary array, and you are supposed to count the number of subarrays of length 'x' with contiguous 1's, where 'x' is queried.

Q3
Self-Introduction
Behavioral

I was asked to introduce myself.

Google Software Engineer, University Graduate, 2026 - India — Interview Experience (DSA+Googlyness)
google logo
Google
Software Engineer, New GradIndiaNo Offer
November 24, 2025102 reads

Summary

I interviewed for a Google Software Engineer New Grad position in India, consisting of two DSA rounds. Despite successfully solving both problems, I was not selected, largely due to a challenging and dismissive first-round experience.

Full Experience

I was contacted directly by a Google recruiter for the New Grad 2026 role and received an interview invite about two weeks later. Two rounds were initially scheduled for the same day, though one was rescheduled at the last moment.

Round 1 (60 minutes — 45 min DSA + 15 min Googlyness)

My interviewer joined around 25 minutes late, adding stress as I had another interview with a tight 20-minute gap. The problem itself was straightforward, and I was able to solve and code it. However, the overall interaction was uncomfortable. While I was coding and explaining my thought process, the interviewer abruptly told me to stop speaking and just write the code. After I completed my solution, she spent around 5–7 minutes checking it line-by-line against what seemed like an internal reference. The tone throughout our conversation felt irritated and dismissive, which made the experience quite difficult despite my maintaining professionalism.

Round 2 (45 minutes — DSA Only)

This round went significantly better. My interviewer was someone I recognized from Instagram/LinkedIn (a known tech influencer), and the interaction was smooth and positive. I clearly discussed my approach, covering edge cases, and walked through a dry run for the problem and its follow-up. My interviewer seemed genuinely satisfied with my solution and thought process.

Result

After about 1.5 months, my recruiter informed me that I was not selected. I had anticipated this result due to how the first round went, but it still stings when you’ve put in the effort. It was a learning experience regardless. You can prepare endlessly, but sometimes you simply cannot control the interviewer’s attitude or the environment you’re put into. Best of luck to everyone preparing. 🙏

Interview Questions (2)

Q1
Router Message Reachability
Data Structures & Algorithms

You are given routers with names and their locations in 2D space.

For example:

  • Router A → (0, 0)
  • Router B → (0, 8)
  • Router C → (0, 17)
  • Router D → (11, 0)

With a wireless range of 10, when Router A sends a message, it can reach Router B. Router B can then forward it to Router C, but Router D will never receive the message.

Given a list of routers and their coordinates, determine whether a message from Router A can reach Router B.

Q2
Count Binary Tree Islands
Data Structures & Algorithms

Given a binary tree where each node contains only binary values, count the number of “islands.”

Follow-up: Count the sizes of each island.

The twist was that the island structure was given as a tree (not a grid).

Google L4 AI/ML interview experience
google logo
Google
L4 AI/MLOngoing
November 23, 202576 reads

Summary

I interviewed for an L4 AI/ML role at Google, clearing the phone screen, DSA, AI/ML, and GnL rounds. I am currently awaiting team matching and a push to the Hiring Committee, but I'm feeling a sense of rejection already.

Full Experience

Phone Screening

I was presented with a problem: given N CPUs and the time taken to finish each of M tasks, I had to find the minimum time to finish all tasks. A single CPU could only execute one task at a time, with no cooldown involved. For the follow-up, I was asked to find the least number of CPUs needed to achieve that minimum time, assuming it was already found.

Solution

I initially proposed a heap-based solution, but the interviewer later inquired if a heap was truly necessary. I then solved it using an array. For the follow-up, I employed binary search to call the function.

Verdict: Cleared

DSA Round

In this round, I encountered a problem involving an N x M grid of dots. I needed to determine the number of unlock patterns having a length of at least L. I was allowed to start anywhere and visit only available and unvisited neighbors (up, down, right, left, and all 4 diagonals). I couldn't jump over a visited dot. The follow-up question was to add linear optimization.

Solution

I provided a backtracking-based solution. For the optimization, I managed to make it four times faster by utilizing vertical and horizontal symmetry.

AI/ML Round

I was given two arrays of integers and asked to find out in which array a given query integer should lie.

Solution

My initial approach was a clustering-based solution, which I later optimized for variance by considering the distance from existing data points.

GnL Round

This round involved basic situational questions and concluded within 30 minutes.

Current Status

Team matching rounds will be arranged, after which managers will push my profile to the Hiring Committee. Despite clearing the rounds, I am already feeling rejected.

Interview Questions (3)

Q1
Minimum Time to Finish Tasks with N CPUs
Data Structures & Algorithms

Given N CPUs and the time taken to finish each of M tasks, find the minimum time to finish all tasks. One CPU can only execute one task at a time, no cooldown involved. Follow up: Suppose you find the minimum time, what is the least number of CPUs you can use to achieve that minimum time?

Q2
Number of Unlock Patterns in N x M Grid
Data Structures & Algorithms

Given an N X M grid of dots, what is the Number of unlock patterns having length at least L? You are only allowed to start anywhere and visit neighbors (up, down, right, left and 4 diagonals), whichever available and unvisited. You can't jump over visited dot. Follow up: Add linear optimisation

Q3
Query Integer Array Classification
Other

Given two array of integers, find out in which array a given query integer should lie.

Google's Software Development Apprenticeship Rounds
google logo
Google
Software Development ApprenticeshipOngoing
November 21, 2025115 reads

Summary

I recently completed two rounds for Google's Software Development Apprenticeship program 2026. The interviews focused on DSA and 'Googlyness' questions, both of which I felt went well, and I am currently awaiting the results.

Full Experience

I recently completed two rounds for Google's Software Development Apprenticeship program 2026. After the recruiter reached out in early November, a 15-minute call explained that the process would involve two rounds: one on Data Structures & Algorithms (DSA) and another on 'Googlyness' questions.

In the first round, the interviewer presented a simplified version of the Cheapest Flights Within K Stops LeetCode question. The key difference was that my graph had no weights, and I simply needed to determine if the destination was reachable from the source. I came up with a DFS approach and implemented it. The interviewer seemed satisfied but then asked why I didn't opt for BFS. I explained that both solutions have the same worst-case time complexity, and DFS was my initial thought, though in hindsight, BFS would have been a more intuitive choice for reachability in an unweighted graph.

The second round, which happened today, featured a famous question detailed in this blog post. Fortunately, I had encountered this problem during my preparation, so I instantly knew the intended solution and its follow-up. I still took about 5-10 minutes to think and then explained my approach, which the recruiter seemed happy with. After implementing the solution, I explained that the average time complexity would be O(log M) and the worst-case O(M). The recruiter then pointed out that I was missing a crucial detail from the problem statement – it was a 'sparse bit array', meaning the number of 1s would never be the size of the array, a detail I hadn't initially considered.

Overall, I believe both interviews went well, and I'm now just waiting for the final result.

Interview Questions (2)

Q1
Unweighted Reachability in Graph (Cheapest Flights Variation)
Data Structures & AlgorithmsMedium

Given an unweighted graph, a source, and a destination, determine if the destination is reachable from the source. This is a simplified version of the LeetCode problem 'Cheapest Flights Within K Stops' where edge weights are ignored.

Q2
Querying a Sparse Bit Array
Data Structures & AlgorithmsHard

The problem involved querying a bit array. The crucial detail, which I initially missed, was that it's a 'sparse bit array', meaning the number of '1's is significantly less than the total size of the array. This sparsity affects the optimal solution and complexity analysis.

Preparation Tips

My preparation involved consistent practice of LeetCode problems. Crucially, I also spent time reviewing various interview experience blog posts and discussions, which proved beneficial as I encountered a familiar problem during my second interview round.

Google swe sre Dublin phone screen
google logo
Google
swe sredublinOngoing
November 13, 202598 reads

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)

Q1
Simple Prime Number Problem
Data Structures & Algorithms

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.

Q2
Design Algorithm for Supercut Prime Numbers
Data Structures & Algorithms

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.

Q3
Implement and Optimize Sieve of Eratosthenes
Data Structures & Algorithms

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.

Google Interview: Filesystem Handling
google logo
Google
November 13, 2025103 reads

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)

Q1
Filesystem Size Calculation and Optimization
Data Structures & AlgorithmsMedium

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:

  1. Write a function get_size() that returns the total size for a key.
  2. How to optimise the size calculation with caching if needed.
  3. Discussion about what is expected from a typical filesystem. I could come up with the following:
    1. No cycles: a directory cannot include itself directly or indirectly.
    2. Every file belongs to at least one directory.
    3. No two directories share the same child.
    4. No directory contains a non-existent child key.
Google | L4 | Reject
google logo
Google
SDE IIIndiaRejected
November 7, 202580 reads

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:

  1. 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.
  2. 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:

  1. 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.
  2. 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)

Q1
Remove All Adjacent Duplicates In String
Data Structures & AlgorithmsEasy

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.

Q2
Russian Doll Envelopes
Data Structures & AlgorithmsHard

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).

Q3
Path With Maximum Probability
Data Structures & AlgorithmsMedium

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.

Google Web Solution Engineer Interview Experience
google logo
Google
Web Solutions Engineer1.6 yearsNo Offer
November 6, 202596 reads

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)

Q1
Product Inventory System Design with Min Price & Removal
Data Structures & Algorithms

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.

Google L3 Interview Experience
google logo
Google
SDE IBangaloreOngoing
November 3, 2025110 reads

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)

Q1
Next Birthday in Family Tree (Circular)
Data Structures & Algorithms

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.

Q2
Shortest Time to Any Favorite City
Data Structures & Algorithms

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.

Q3
Shortest Path Through a Favorite City
Data Structures & Algorithms

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.

Q4
K Most Highly Rated Related Movies
Data Structures & Algorithms

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.

Q5
K Most Highly Rated Related Movies (Quick Select)
Data Structures & Algorithms

Just explain the quick select method for solving this instead of using the heap.

Q6
Longest Character Chain from Mismatched String Pairs
Data Structures & Algorithms

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.

Q7
Longest Character Chain in a Polytree
Data Structures & Algorithms

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.

Q8
Googlyness Behavioral Interview
Behavioral

Generic behaviourial questions.

Q9
Team Matching Behavioral Interview
Behavioral

Generic behaviourial questions.

Google Software Development Intern 2026, Round-1(Question & Answer)
google logo
Google
Software Development InternOngoing
October 29, 202565 reads

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)

Q1
Binary Tree Operations: Reciprocal, Swap Children, and Mode-based Subtree Removal
Data Structures & AlgorithmsHard

Given a Binary Tree where all nodes have float64 values, implement the following operations:

  1. Replace each node's value with its reciprocal.
  2. Swap the left and right children of each node (not their values).
  3. 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.

Q2
Implement Swap Function for Two Numbers
OtherEasy

How would you implement a function to swap two numbers?

Google Phone Screen
google logo
Google
October 21, 202591 reads

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)

Q1
Restaurant Waitlist System Design
Data Structures & Algorithms

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).

Google L4 onsite round Question | Give most optimised solution
google logo
Google
Software Engineer, L4Ongoing
October 6, 202560 reads

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)

Q1
Electoral Vote Combinations
Data Structures & AlgorithmsHard

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.

Google L4 | Bangalore | 2025
google logo
Google
SDE IIBangaloreRejected
October 1, 2025140 reads

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)

Q1
Maintain Top K Elements in a Stream
Data Structures & Algorithms

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.

Q2
Topological Sort + BFS Question
Data Structures & AlgorithmsMedium

This was a straightforward problem that required applying Topological Sorting, specifically using a Breadth-First Search (BFS) based approach.

Q3
Line Sweep Algorithm with Intervals
Data Structures & AlgorithmsMedium

The problem involved applying the Line Sweep Algorithm to efficiently handle and process a given set of intervals.

Q4
Log Message Filtering (Print if not seen in last 10s)
Data Structures & Algorithms

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.'

Q5
Log Message Filtering - Memory Optimization (Cleanup)
Data Structures & Algorithms

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.

Q6
Log Message Filtering (Not in previous 10s AND next 10s)
Data Structures & Algorithms

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 6
Leetcode 15
Java 1
Java 12
Java 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.

Google | L4 | Phone | U.S | Rejected
google logo
Google
SDE IIU.S.Rejected
September 25, 202558 reads

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)

Q1
Find Squares from 2D Coordinates
Data Structures & AlgorithmsMedium

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}]

Google Onsite Interview US
google logo
Google
USOngoing
September 14, 202557 reads

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)

Q1
Count Lakes in an Island Grid
Data Structures & AlgorithmsHard

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.

Google Interview Experience – Google University Graduate 2026
google logo
Google
university graduate 2026Rejected
September 13, 2025196 reads

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)

Q1
Graph Traversal with String Nodes
Data Structures & Algorithms

I was presented with an implementation-heavy graph problem where the nodes were represented by strings. The solution required using graph traversal techniques.

Google L4 India Interview Experience
google logo
Google
SDE IIIndiaRejected
September 7, 2025112 reads

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)

Q1
Dice Roll Combinations (Higher Value)
Data Structures & Algorithms

Given two n-faced dice being rolled, count the number of combinations where one die’s value is higher than the other.
Follow-up: Generalize this efficiently for k dice.

Q2
Graph Ring Traversal & Validation
Data Structures & Algorithms

A problem involving graph ring traversal and validation.

Q3
Forest Traversal with Ratings
Data Structures & Algorithms

A problem on forest traversal with ratings, requiring optimization techniques like sliding window, deque, and dynamic programming.

Q4
Modified Russian Doll / Box Stacking
Data Structures & Algorithms

A modified version of the Russian Doll / Box Stacking problem, including a follow-up about handling rotations.

Q5
Sentence Scoring + Java Intricacies
Data Structures & Algorithms

A sentence scoring problem, followed by a discussion on Java intricacies, specifically comparing ArrayList vs LinkedList.

Q6
Behavioral Questions (Diversity, Deadlines, Leadership)
Behavioral

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.

Google Phone Screen L3 - USA - Rejected
google logo
Google
SDE IUSARejected
September 4, 202565 reads

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)

Q1
Map IP Address to Most Specific Prefix
Data Structures & Algorithms

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
IP Address examples provided:
  • 0.0.0.0
  • 192.168.7.1
  • 192.168.2.3
  • 192.168.2.1
Expected Output for examples:
  • 0.0.0.0 &rarr; *
  • 192.168.7.1 &rarr; 192.168.*
  • 192.168.2.3 &rarr; 192.168.2.*
  • 192.168.2.1 &rarr; 192.168.2.1

Google L3 onsite experience
google logo
Google
Ongoing
September 3, 202542 reads

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)

Q1
Restaurant Waitlist Data Structure
Data Structures & Algorithms

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).

Q2
Simplify Algebraic Formula with Parentheses
Data Structures & Algorithms

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-c
a-(a-b) -> b

Q3
Decompress String with Nested Repetitions
Data Structures & Algorithms

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"

Google L4 Onsite Interview
google logo
Google
SDE II
September 2, 202543 reads

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)

Q1
Partition Equal Subset Sum Variation
Data Structures & AlgorithmsMedium

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.

Google L4 Phone screening
google logo
Google
September 1, 202540 reads

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)

Q1
Stream Triplet with Difference Constraint
Data Structures & AlgorithmsHard

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.

Google L4 Onsite Interview Round
google logo
Google
Ongoing
September 1, 202536 reads

Summary

I had an L4 onsite interview round with Google where I was presented with a complex maze navigation problem for a blind robot. I provided a brute-force BFS solution, but the interviewer sought a more optimal approach.

Full Experience

I recently completed an onsite interview round with Google for an L4 position. The interviewer I spoke with was from India. The core of the interview revolved around a challenging problem regarding a blind robot navigating a maze, which required me to devise a set of commands to ensure escape from any valid starting point.

Interview Questions (1)

Q1
Blind Robot Maze Escape
Data Structures & AlgorithmsHard

Input is a maze represented by a 2D matrix. A cell can have 3 values (# - wall, . - empty cell, E - Escape point). There's a blind robot, who can travel in 4 directions (R, U, L, D). Write a set of commands such that when the robot is placed on any valid cell, it should be able to escape the maze. The robot can exit through the maze early without completing all commands as well (see examples).

Example Input 1:

#####
#...#
#..E#
#####

Output : DRR

Example Input 2:

####
#.E#
##.#
####

Output : RU
Explanation:
For the Bottom valid cell(2,3) => The robot will hit Wall first(R) and then move Upwards(U) and exit the maze.
For the First valid cell(1,2) => The robot will exit through the first command (R) and exit the maze.
Google Coding Round 1
google logo
Google
August 31, 202533 reads

Summary

I had a Google coding interview where I was challenged to find the number of squares formed by a given set of coordinates, initially with axis-parallel sides and then with any orientation.

Full Experience

My recent coding round at Google began with an interesting geometry problem. I was given a list of [x, y] coordinates and asked to determine the total number of squares that could be formed using these points. The interviewer first clarified that the sides of the squares must be parallel to the x and y axes. After discussing this, a follow-up modified the problem to consider squares with any orientation, making it a more complex challenge.

Interview Questions (2)

Q1
Count Axis-Parallel Squares from Points
Data Structures & Algorithms

Given a list of [x, y] coordinates on a coordinate plane, find the number of squares. The sides of the squares are required to be parallel to the x and y axes.

Q2
Count Squares from Points (Any Orientation)
Data Structures & Algorithms

Follow-up question: Given a list of [x, y] coordinates on a coordinate plane, find the number of squares. The sides of the squares are NOT required to be parallel to the x and y axes, but it must still be a square.

Google L4 | Interview Experience | India | Fullstack
google logo
Google
l4 fullstackindiaRejected
August 26, 202536 reads

Summary

I interviewed for a Fullstack L4 position at Google in India, completing three DSA rounds and one Googlyness round. Despite positive feedback on most rounds, I was ultimately rejected due to my performance in one of the DSA rounds where I couldn't optimize a problem with advanced data structures.

Full Experience

My Google L4 Fullstack interview experience in India involved four rounds. The first three were focused on Data Structures and Algorithms, and the final round was Googlyness. The HR mentioned that Google has shifted to 3 DSA interviews instead of 4, with a perceived increase in question complexity.

Round 1: DSA Round - Hire (Very Positive)

This round involved a problem about inferring player ranks from match results. Given n players with distinct ranks and m match results (a defeated b), the task was to identify which players' ranks could be precisely determined. A player's rank is precise if the sum of stronger and weaker players (stronger_count[i] + weaker_count[i]) equals n - 1. My solution used a graph traversal approach: I treated players as nodes and drew directed edges from winner to loser. For each player, I counted stronger players by traversing the reverse graph and weaker players by traversing the original graph. I provided a dry run with an example (n=5, various matches) to demonstrate how player 2's rank could be precisely determined.

Round 2: DSA Round - Hire (Positive)

The second DSA round presented a problem about generating the Nth license plate from a global sequence. License plates are 5 characters long and are issued in 6 consecutive ranges, varying from 0 letters + 5 digits to 5 letters + 0 digits. The function string getNthPlate(long long n) was required. I solved this by first using a brute-force approach and then optimizing it. My optimized solution involved storing the range counts in a vector and then iterating through these ranges to find where n falls. I then determined the number of digits and letters for that specific range based on the remaining n value. I gave a proper dry run, explaining how n is decremented as ranges are consumed until it's zero, at which point an encode function converts the indices into the final string.

Round 3: DSA Round - No Hire

This was the round that led to my rejection. The problem involved querying the latest application version that supports a given OS version. Each app had a name, minOS, maxOS, and a releaseOrder. For example, given apps like 'v1' (min=14, max=+∞, order=1) and 'v3' (min=12, max=16, order=3), an OS query of '14' should return 'v3'. My brute-force approach involved scanning all apps for each query and tracking the one with the highest release order that supported the OS. I optimized it slightly by sorting apps by release order and checking from the latest. The interviewers asked me to code this, and I couldn't think of a more optimal solution involving advanced data structures at the time. I later realized a sweep line algorithm with disjoint segments would be more efficient, involving converting app ranges into events and maintaining a max-heap of active apps. This would allow for O(log K) query resolution, though I was unsure if a segment tree would be an exact fit or overkill.

Round 4: Googlyness Round - Hire (Positive)

This round was entirely behavioral and lasted about 40 minutes. I received positive feedback for this round.

Final Verdict: Rejected, primarily due to my performance in Round 3.

Interview Questions (3)

Q1
Player Rank Inference from Match Results
Data Structures & AlgorithmsMedium

There are n players, each with a distinct rank from 1 (highest) to n (lowest). A player with a better (lower-numbered) rank always beats a player with a worse (higher-numbered) rank. We are given m match results (a, b) meaning player a defeated player b. Based on these results, we must determine which players' ranks can be precisely inferred.

Q2
Get Nth License Plate
Data Structures & AlgorithmsMedium

An office issues license plates in 6 consecutive ranges, each range having a fixed number of letters (A–Z) and digits (0–9). All license plates are exactly 5 characters long. The ranges are issued in the following order:

  • 0 letters + 5 digits: 00000 ... 99999
  • 1 letter + 4 digits: A0000 ... Z9999
  • 2 letters + 3 digits: AA000 ... ZZ999
  • 3 letters + 2 digits: AAA00 ... ZZZ99
  • 4 letters + 1 digit: AAAA0 ... ZZZZ9
  • 5 letters + 0 digits: AAAAA ... ZZZZZ
Task: Implement string getNthPlate(long long n); that returns the n-th license plate in the global sequence (0-indexed).
Examples:
  • Input: n = 0, Output: "00000"
  • Input: n = 1, Output: "00001"
  • Input: n = 100000, Output: "A0000"
  • Input: n = 100001, Output: "A0001"
Q3
Query Latest App Version by OS Range
Data Structures & AlgorithmsHard

We have multiple application versions, each defined by the OS version range they support. A query gives us a specific OS version, and we need to return the latest app version (highest release order) that supports it.
Each app has:

  • name (e.g., "v1", "v2", "v3")
  • minOS (lower bound, or -∞ if no bound)
  • maxOS (upper bound, or +∞ if no bound)
  • order (release order)
Example Applications:
  • v1: min=14, max=+∞, order=1
  • v2: min=-∞, max=8, order=2
  • v3: min=12, max=16, order=3
Queries:
  • OS = 3 → v2 (falls in [-∞,8])
  • OS = 11 → None (no version covers it)
  • OS = 14 → v3 (v3 covers [12,16] and is newer than v1)
  • OS = 7 → v2 (covered by v2)
  • OS = 20 → v1 (covered only by v1)

Preparation Tips

I learned that Google has started taking 3 DSA interviews now rather than 4, as per a process change. I believe the complexity of the questions has increased with this change. My experience highlighted the importance of covering advanced topics, especially when preparing for MAANG companies like Google. I also mentioned having another offer from Microsoft at that time, linking to my Microsoft L61 interview experience.

Google L3 | Phone Screening | Interview
google logo
Google
SDE IOngoing
August 25, 202524 reads

Summary

I recently had a phone screening interview for an L3 role at Google, where I was presented with two challenging string manipulation problems, both of which I successfully solved.

Full Experience

I recently underwent a phone screening interview for an L3 position at Google. The interview focused heavily on my problem-solving skills, and I was given two distinct coding challenges related to string encoding and decoding. I managed to solve both problems during the interview session, feeling confident in my approaches.

Interview Questions (2)

Q1
Encode String with Brackets
Data Structures & AlgorithmsMedium

Given an encoded string, return its decoded string. The encoding rule is: k[encoded_string], where the encoded_string inside the square brackets is being repeated exactly k times. You may assume that the input string is always valid; No extra white spaces, square brackets are well-formed, etc.
Input: s = "3[a]2[bc]"
Output: "aaabcbc"

Q2
Decode String to Shortest Encoded Form
Data Structures & AlgorithmsHard

Given a decoded string, find the shortest possible encoded string. The encoding rule is: k[encoded_string], where k is the number of times encoded_string repeats. The goal is to minimize the length of the encoded string.
Input: s = "aaabcbc"
Output: "3[a]2[bc]"

Google onsite done, waiting on next steps — will Googliness happen?
google logo
Google
Ongoing
August 25, 202518 reads

Summary

After completing Google's onsite interviews, the candidate is awaiting final feedback and seeks insights on the timeline for the hiring committee's decision. They had three technical rounds focused on graph problems, with some challenges in time complexity calculations and follow-up questions.

Full Experience

Recently, I completed my Google onsites after several rescheduling issues. My interviews were all technical and focused heavily on graph-related problems, which were not easy but manageable. I solved the problems, answered follow-ups, and had solid conversations with the interviewers, though I didn't 'nail' every round perfectly. A notable slip-up was in the third round where I miscalculated time complexity, using a putIfAbsent inside nested loops leading to an incorrect n*n*logn complexity instead of n(n + logn).

The interview process started with a phone screening in June, followed by multiple follow-ups and a change in recruiting partners. I was eventually called for onsites in July, but due to a requested mock interview and interviewer unavailability, the dates were rescheduled to mid-August. The questions were all graph-based, with the third round being medium-hard and requiring some time to figure out the approach. I managed to write working code, but there were follow-up questions on syntax, time complexity, and the choice between BFS and DFS.

Interview Questions (3)

Q1
Graph Traversal Decision: BFS vs DFS
Data Structures & AlgorithmsMedium

During the first onsite interview, I was asked to compare the use of BFS and DFS for finding the shortest path in a graph. The interviewer then asked follow-up questions based on either approach, with the main focus on the other. I was required to explain why I chose BFS over DFS and why a PriorityQueue was preferred over a normal queue for implementing BFS.

Q2
Graph Problem with Adjacency Structures
Data Structures & AlgorithmsMedium

In the second onsite interview, the problem was again graph-related, though the interviewer only had 1-2 follow-ups. The interview ended within the first 35-40 minutes. The main focus was on constructing the adjacency matrix or list, and the difference between BFS and DFS. I fumbled a bit with the latter, but eventually explained the distinctions.

Q3
Medium-Hard Graph Problem
Data Structures & AlgorithmsHard

The third onsite interview featured a medium-hard graph problem that I hadn't encountered before. It took some time to figure out the approach, but I was able to write working code. Follow-up questions were asked about syntax, time complexity, and the decision between BFS and DFS.

Preparation Tips

I prepared for the interviews by focusing on graph algorithms and their applications. I practiced problems related to BFS and DFS, and I made sure to understand the time complexity of different approaches. I also prepared for follow-up questions on syntax and algorithmic choices.

Google Interview Experience ( Median Range Question )
google logo
Google
Ongoing
August 20, 20259 reads

Summary

Had my 2nd Google round today with a question about designing 2 APIs for a data stream that returns numbers between the nearest powers of 2 of the current median. Faced challenges with infinite stream constraints and eventually came up with an O(1) space solution with hints from the interviewer.

Full Experience

Had my 2nd Google round today, and the question was to design 2 APIs/functions for insert into a data stream and return any number between the nearest powers of 2 of the current median.

I started with a multiset + iterator to the median approach.

But then the interviewer reminded me it’s an infinite stream, so O(N) space won’t work.

Then I thought in terms of ranges instead of storing elements. I wrote down buckets like [2^0,2^1], [2^1,2^2], …, [2^63,2^64] and realized I could just maintain the bucket index of the median. Took me a bit of struggle, but with hints from the interviewer, I came up with an O(1) space solution. Finally coded it up.

Follow-ups

Handling negatives: I suggested skipping them / treating separately.

Interviewer pointed out not to use while(1){} (I did that in the code 😅).

At the nadir we had a nice casual talk since he was from my college too (noticed from his Google ID photo, clg alumini what a coincidence lol....).

Felt like it went fine maybe hire / strong hire, not sure, but let’s hope 🤞.

Interview Questions (1)

Q1
Design APIs for Median Range Query
Data Structures & Algorithms

Design 2 APIs/functions for insert into a data stream and return any number between the nearest powers of 2 of the current median.

Google l4 onsite scheduled
google logo
Google
SDE IInullOngoing
August 19, 20258 reads

Summary

I cleared the Google L4 phone screen and have my final loop scheduled next week with 4 coding rounds.

Full Experience

I just cleared the Google L4 phone screen and have my final loop scheduled next week (4 coding rounds, as confirmed by the recruiter). Could anyone share what specific topics Google tends to focus on, or any recent interview experiences that might help?

Interview Questions (1)

Q1
Zig-Zag Grid Traversal
Data Structures & Algorithms

Traverse the grid in a zig-zag manner, similar to a-a-b-b-c-c pattern in a grid.

Google - L4 SWE III - phone screen - Zurich
google logo
Google
l4 swe iiizurichno offer
August 18, 202510 reads

Summary

I had a phone screen with Google for the L4 SWE III role in Zurich. The interview focused on a merge interval problem, similar to LeetCode #56, but with a unique twist. Despite my best efforts, I performed poorly. However, I wanted to share the question type to help others prepare.

Full Experience

Today I had a phone screen with Google for the L4 SWE III role in Zurich. The interview was a single coding problem, which was similar to LeetCode #56, the merge intervals problem. However, there was a unique twist to the problem that made it more challenging. I rephrased the problem using GPT to avoid any conflict with Google's NDA. I performed very badly during the interview, but I wanted to share the question type so that others can use it for preparation.

Interview Questions (1)

Q1
Gaps on a Half-Line
Data Structures & Algorithms

Input: N, then N lines of c r.
Each pair blocks the closed interval [c-r, c-r] on [0, ∞).
Output: all maximal uncovered gaps in increasing order as a b; use -1 for +∞.
Notes: intervals are closed (touching ⇒ no gap); blocks may start < 0; include the gap from 0 if any.

Google L4 | Interview Experience | India | Fullstack
google logo
Google
fullstackindiaOffer
August 17, 20257 reads

Summary

I secured a Fullstack L4 role at Google after a rigorous interview process that included multiple technical rounds, a Googlyness round, and a team-matching interview. The outcome was a positive hiring decision with an offer accepted.

Full Experience

My journey to Google began with applying through the careers page in April, and a recruiter reached out on April 28th. The first technical interview on May 23rd involved a simple tree traversal problem, which I handled well, leading to a positive verdict. The subsequent rounds included a stack-based problem (LeetCode Medium), a Binary Search Tree question with a follow-up, and a Heap problem. Each round had its challenges, but I managed to demonstrate my skills effectively. The Googlyness round was a great conversation about leadership and teamwork, and the team-matching interview confirmed my fit for the role. Finally, the offer was accepted, marking the culmination of a successful interview process.

Interview Questions (5)

Q1
Tree Traversal Problem
Data Structures & AlgorithmsEasy

A simple tree traversal problem, which was a LeetCode Easy problem. The task involved traversing a tree structure and performing a specific operation on the nodes.

Q2
Stack-Based Problem
Data Structures & AlgorithmsMedium

A stack-based problem (LeetCode Medium) that required implementing a solution without follow-up questions. The problem involved using stack operations to solve a specific task.

Q3
Binary Search Tree and Follow-Up
Data Structures & Algorithms

A Binary Search Tree question followed by a variation of Binary Search. The first problem was solved within 15 minutes, but the follow-up caused some tension as the interviewer expected a different approach.

Q4
Heap Problem
Data Structures & AlgorithmsMedium

A problem involving Heaps (LeetCode Medium). The task required implementing a heap and discussing its properties, time complexity, and implementation details.

Q5
Binary Search + Sliding Window
Data Structures & Algorithms

A problem combining Binary Search and Sliding Window techniques. The task involved discussing both brute force and optimized solutions, with partial coding completed due to time constraints.

Preparation Tips

As someone with prior experience interviewing at Google, I knew how to drive the interview process, which helped create a good impression. I focused on understanding the problem thoroughly and explaining my approach clearly. For the technical rounds, I practiced common data structures and algorithms, ensuring I could handle both standard and follow-up questions. I also prepared for the Googlyness round by reflecting on my leadership experiences and how I handle team conflicts.

My Recent Google Interview Experience: University Graduate 2026
google logo
Google
software engineer – university graduate 2026rejected
August 16, 20256 reads

Summary

I had a Google interview experience as a university graduate in 2026. I went through three rounds of interviews, including two technical rounds and one technical + Googliness round. Despite feeling confident after the final round, I received a rejection and no detailed feedback.

Full Experience

I applied via referral in April and received hiring interest form in May, with interview confirmations in June. The first technical round was a 45-minute session where the interviewer joined 10 minutes late but ended on time. The problem was based on Priority Queue (LeetCode Medium level). I discussed my brute force and optimal approach, then implemented the optimal one. The interviewer mentioned a follow-up question, but there wasn't enough time to discuss it further.

The second technical round was also 45 minutes on June 23. The question was Stack-based (LeetCode Hard level). I shared my approach step by step, but the interviewer didn't respond or clarify my questions. Still, I managed to solve the main problem optimally and completed the follow-up within time.

The third round was technical + Googliness on July 16. This was my best round—the interviewer was very friendly and encouraging. The problem set was Graph-based, and I solved both the main problem and the follow-up within the given time. The last 15 minutes were Googliness questions about leadership and teamwork experiences, which I answered confidently.

I felt confident after the final round and was hopeful for a positive result. However, on July 12 I received a rejection call, and the recruiter didn't share detailed feedback despite asking. It was tough to digest, especially after putting so much effort into preparation and execution. Still, I see this as a learning experience—sometimes rejection isn't about capability but about timing, fit, or just circumstances. This interview gave me a lot of confidence and clarity, and I believe it has prepared me better for future opportunities. I'll keep pushing forward and come back stronger.

Interview Questions (3)

Q1
Priority Queue Implementation
data structures & algorithmsmedium

The problem was based on Priority Queue (LeetCode Medium level). I first discussed my brute force and optimal approach, then implemented the optimal one.

Q2
Stack-based Problem
data structures & algorithmshard

The question was Stack-based (LeetCode Hard level). I shared my approach step by step, but the interviewer neither responded nor clarified any of my questions.

Q3
Graph-based Problem
data structures & algorithms

The problem set was Graph-based. I solved both the main problem and the follow-up within the given time.

Google Four-Round Interview Experience
google logo
Google
Ongoing
August 14, 202524 reads

Summary

I experienced a four-round interview process at Google, which included three challenging coding rounds focused on graph algorithms, data stream manipulation, and string processing, alongside a Googleyness behavioral round. While some coding problems were tough, I felt I performed well in others and approached the behavioral questions confidently.

Full Experience

I recently completed a comprehensive four-round interview process with Google. The first round was focused on coding, presenting a challenging graph problem about finding the lowest total cost for two individuals traveling to a common destination. I struggled with this, perhaps overthinking for an optimal solution instead of starting with a brute-force approach as hinted by the interviewer. I couldn't fully solve it during the interview.

The second coding round involved designing a function to store integers in a data stream and, after each insertion, identify a triplet where all pairwise absolute differences were within a given distance. Initially, I considered dynamic programming, but with a subtle hint from the interviewer to view the stream as a number line, I pivoted to an approach involving maintaining a sorted order and using a linear scan. I further optimized this with monotonic and temporary stacks, which the interviewer appreciated, and I felt quite confident about my performance in this round.

My third coding interview asked me to identify ambigrams from a list of words. This felt more straightforward; I used a double-pointer method with character-to-bidirectional character conversion, and the interviewer seemed satisfied. A follow-up question about 'interesting words' was too vague to provide a concrete solution.

Finally, the fourth round was the Googleyness interview. Here, I was asked about past failures and experiences where I created something from nothing. I believe that by understanding Google's culture and preparing relevant stories using the STAR method, one can navigate this round successfully.

Interview Questions (5)

Q1
Lowest Total Cost to Reach Destination City
Data Structures & AlgorithmsHard

Given a graph of cities, two individuals, A and B, live in different cities and are both traveling to the same destination city. The task is to find the lowest total cost required for both A and B to reach that common destination.

Q2
Find Triplet in Data Stream within Distance
Data Structures & AlgorithmsHard

Implement a function fn(value: int) that takes an integer and adds it to a data stream. After each insertion, the function must return a triplet (x, y, z) from the data stream that satisfies the conditions abs(x-y) <= distance, abs(y-z) <= distance, and abs(z-x) <= distance. If no such triplet exists, return None.

Q3
Find Ambigrams in a List of Words
Data Structures & AlgorithmsMedium

Given a list of words, return a new list containing only the words that are ambigrams (words that read the same when rotated 180 degrees).

Q4
Describe a Failure Experience
Behavioral

Tell me about a time you experienced failure, detailing the situation and what transpired.

Q5
Describe Creating Something from Nothing
Behavioral

Tell me about a specific instance where you initiated and built something from scratch.

My Interview experience at Google 2025 for MLE-III (L-5)
google logo
Google
MLE-IIIHyderabad, IndiaRejected
August 14, 202532 reads

Summary

I interviewed at Google for an MLE-III role in Hyderabad, India, in 2025. Despite performing well in the first coding round, I was unfortunately rejected after the second coding interview.

Full Experience

I was contacted by a Google recruiter via LinkedIn for an MLE-III position in Hyderabad, India. After receiving preparation materials and guides, my first round was scheduled for July 23rd, 2025.

1. Online Coding Interview (Round 1)

This 45-minute Google Meet interview presented me with a problem involving a multiline log of friend connections with timestamps. The goal was to find the earliest timestamp when everyone became friends with each other. The log could be stored in memory. I immediately recognized it as a graph problem. My first approach involved preprocessing the log to identify unique individuals, assigning them unique indices, and then constructing a graph. I planned to treat every individual as a separate connected component and decrease a global component count as I traversed each log entry and added edges between nodes. The timestamp at which the component count reached 1 would be the answer. My second, more refined approach, utilized the Union-Find algorithm. I initialized a parent array where each person was their own parent. While traversing the logs and performing union operations, I kept track of the component count. The moment it became 1, I returned that timestamp.

2. Online Coding Interview (Round 2)

In this second 45-minute Google Meet coding interview, I was given a list of lists of words, where each nested list represented a sentence. I was required to implement a method to predict bigrams. For each query with a single word, I had to return the next word that most frequently follows it in the data. For example, for input [['I', 'am', 'king'], ['I', 'am', 'travelling'], ['I', 'like', 'mangoes']] and the query 'I', the method should return 'am', since 'am' appears twice after 'I'. Unfortunately, I struggled to come up with the solution in time. I overthought the problem, assuming it would be more complex, and overlooked the simple approach of using nested maps: the outer map would store the first word as the key, and the inner map would keep a count of each word occurring after it. For each prediction call, the solution should look up the next word with the highest count.

Result

I was unfortunately rejected after the second round. The recruiter called and informed me that I did not perform well in the second round, and they would not be moving forward with my application.

Interview Questions (2)

Q1
Time Everyone Becomes Friends
Data Structures & AlgorithmsMedium

Given a multiline log in a fixed format, such as:

  • 455456 Ram became friend to Shyam.
  • 455459 Ramesh became friend to Mahesh.
  • 455465 Moham became friend to Ram.
  • 455489 Shyam became friend to Mahesh.

In this log, the integer value is the timestamp. The task is to return the time at which everyone becomes friends with each other. The log is not a stream; it can be stored in memory.

Q2
Bigram Prediction from Sentences
Data Structures & AlgorithmsMedium

Given a list of lists of words, where each nested list represents a sentence, I was required to implement a method to predict bigrams. For each query with a single word, I had to return the next word that most frequently follows it in the data.

Example: For input [["I", "am", "king"], ["I", "am", "travelling"], ["I", "like", "mangoes"]] and the query "I", I should return "am", since "am" appears twice after "I".

Preparation Tips

My preparation primarily involved using LeetCode and the Neetcode 250 list, with a strong focus on data structures and algorithms. I practiced around 5 problems every day after work. This experience highlighted my need to improve my speed on tree and graph problems and to avoid overcomplicating problems during interviews.

Google | L4 | Interview
google logo
Google
SDE IInullnull
August 13, 20256 reads

Summary

Interviewed at Google for a L4 position. The interview focused on a problem where I had to find a solid square of 1s in a matrix, returning its coordinates and size. The expected time complexity was O(m or n).

Full Experience

During my interview at Google for the L4 position, I was presented with a problem involving a matrix representing a video frame. The task was to identify a solid square of 1s, which represented a book tag. If such a square existed, I needed to return its upper-left corner coordinates and the size of the square. If not, the size should be 0. Additionally, the square was guaranteed to be at least sqrt(n) x sqrt(n) in size. The expected solution had to achieve a time complexity of O(m or n), which I found challenging to implement efficiently.

Interview Questions (1)

Q1
Find Solid Square in Matrix
Data Structures & AlgorithmsHard

Write a function that finds a single tag in an image. Your function will be given an m x n matrix, representing one frame of video. The matrix consists of mostly 0s, but somewhere within the matrix there may be a solid square of 1s. This solid square represents the book tag.

If the square of 1s is present, your function should return the coordinates of the upper-left corner of the square of 1s, and the size of the square. If there isn't a square of 1s, return that the size is 0. Additionally, if there is a square of 1s it will be at least sqrt(n) x sqrt(n) in size.

Google | Interview Experience | L4 | India
google logo
Google
SDE IIIndia
August 3, 20255 reads

Summary

I interviewed for an L4 Software Engineer role at Google in India, completing the process over approximately four months. The interview rounds included a phone screen focusing on expression evaluation, an onsite round on designing a BookManager class, and a Googleyness round for behavioral assessment.

Full Experience

Phone Screen
Evaluate arithmetic expressions with nested operations.
Examples:
a - (b - c) should simplify to a - b + c
a + (b - a) should simplify to b

Onsite Interview – Round 1:
Design and implement an BookManager class with the following functionalities:

insert(bookNumber, score): Insert a new book with its corresponding score.

get(): Retrieve the book with the highest score. After retrieval:
Its score is decreased by 1.

It becomes temporarily ineligible for the next get() call.

Follow-up 1:
Extend the logic so that once a book is retrieved, it becomes ineligible for the next n get() calls.

Follow-up 2:
Now each book also has an associated delay. Once a book is retrieved at time T1, it should not be eligible again until T1 + book.delay.

Onsite Interview – Round 2:
Can't recall completly but it was related to 2 pointers.

Onsite Interview – Round 3:
Similar to onsite-2 question here - https://leetcode.com/discuss/post/6812909/chances-of-swe-3-at-google-by-anonymous_-2wwd/

and couple of follow ups.

Googleyness:
This round focused on behavioral questions and understanding cultural fit.

Entire process took ~4 months.

All the best!

Interview Questions (3)

Q1
Evaluate Arithmetic Expressions with Nested Operations
Data Structures & AlgorithmsMedium

Evaluate arithmetic expressions with nested operations.
Examples:
a - (b - c) should simplify to a - b + c
a + (b - a) should simplify to b

Q2
Design BookManager Class with Score-Based Retrieval and Eligibility Rules
Data Structures & AlgorithmsHard

Design and implement an BookManager class with the following functionalities:

  • insert(bookNumber, score): Insert a new book with its corresponding score.
  • get(): Retrieve the book with the highest score. After retrieval:
    • Its score is decreased by 1.
    • It becomes temporarily ineligible for the next get() call.

Follow-up 1:
Extend the logic so that once a book is retrieved, it becomes ineligible for the next n get() calls.

Follow-up 2:
Now each book also has an associated delay. Once a book is retrieved at time T1, it should not be eligible again until T1 + book.delay.

Q3
Behavioral / Cultural Fit
Behavioral

This round focused on behavioral questions and understanding cultural fit.

Google SWE internship 2026
google logo
Google
SWE Internship
August 3, 20254 reads

Summary

I interviewed for a Google SWE Internship, successfully passing the first technical round which involved a string and unordered map problem. The second round presented a more complex variation of the median of a data stream problem on subarrays, which I eventually solved but was ultimately rejected due to taking too much time and perceived nervousness. I learned the importance of confidence and careful reading of questions.

Full Experience

Recently, i got the chance to interview at Google for their SWE Internship 2026. The recruiter had reached out to me through mail saying that they would like to interview me for further processes.

First, i had a small chat with HR, it was a friendly discussion about what language i'm comfortable for the next round and explaining one of my projects. I noted that they wanted to verufy your leetcode account and remarked on the number of questions solved. 400+ seems to be a good number for them.

Technical Round-1: 45 mins, but cut short to around 35-40 mins due to interviewer's busy-schedule.

Due to google's policy, disclosing questions isnt allowed. But it was a medium level string-unordered-map question with some tweaks in a storing rotated order of string too. This round went good, she had asked me TC, SC, optimisations and edge cases. However understanding the question was slightly tricky.

I cleared this round!

Technical Round-2: 45 mins

It was similar to round-1 but the interviewer was a little stricter and the question was similar to median of a data-stream, but here the datastream consisted of all subarrays in order. (Not disclosing the exact question, the question was worded slightly more complicated and it took me time to understand what it meant). I took too much time to understand the question and find the approach as it was relatively tougher than the original problem. I was able to get the solution by the end and the code seemed to be perfect. I was really nervous during my interview and wasn't sure about my approach. I believe this is why i got rejected.

Verdict: rejected :(

But i learnt a lot in this process and I'm grateful for this opportunity as it came out of the blue! It was an amazing experience overall! Everything happens for a reason and I believe something better awaits! Key-takeaways: be confident in your approach and read the question very carefully! Just solving the question doesnt make you safe, you should be more confident and stern that what you're saying is right so that the interviewer doesnt cross question everything you're saying!

Hope this helps someone! Thanks and all the best!! Something better awaits!

Interview Questions (1)

Q1
Median of Subarray Data Stream
Data Structures & AlgorithmsHard

The problem was similar to finding the median of a data stream, but the data stream consisted of all subarrays in order. The question was worded slightly more complicated, and it took me time to understand what it meant. I found this question relatively tougher than the original 'median of a data stream' problem.

Preparation Tips

I had solved 400+ LeetCode questions, which seemed to be a good number for Google. Key-takeaways from the interview included being confident in my approach and reading the question very carefully, understanding that just solving a question isn't enough; confidence and conviction in one's solution are also crucial.

Google SWE Internship Interview Experience
google logo
Google
SWE Internship
August 3, 20255 reads

Summary

I interviewed for a Google SWE Internship, successfully navigating the initial HR chat and a technical round involving string manipulation. However, I was ultimately rejected after struggling with a complex variation of the 'Median of a Data Stream' problem during the second technical round.

Full Experience

Recently, i got the chance to interview at Google for their SWE Internship 2026.

The recruiter had reached out to me through mail saying that they would like to interview me for further processes.

First, i had a small chat with HR, it was a friendly discussion about what language i'm comfortable for the next round and explaining one of my projects. I noted that they wanted to verufy your leetcode account and remarked on the number of questions solved. 400+ seems to be a good number for them.

Technical Round-1: 45 mins, but cut short to around 35-40 mins due to interviewer's busy-schedule.

Due to google's policy, disclosing questions isnt allowed. But it was a medium level string-unordered-map question with some tweaks in a storing rotated order of string too. This round went good, she had asked me TC, SC, optimisations and edge cases. However understanding the question was slightly tricky.

I cleared this round!

Technical Round-2: 45 mins

It was similar to round-1 but the interviewer was a little stricter and the question was similar to median of a data-stream, but here the datastream consisted of all subarrays in order. (Not disclosing the exact question, the question was worded slightly more complicated and it took me time to understand what it meant). I took too much time to understand the question and find the approach as it was relatively tougher than the original problem. I was able to get the solution by the end and the code seemed to be perfect. I was really nervous during my interview and wasn't sure about my approach. I believe this is why i got rejected.

Verdict: rejected :(

But i learnt a lot in this process and I'm grateful for this opportunity as it came out of the blue! It was an amazing experience overall! Everything happens for a reason and I believe something better awaits! Key-takeaways: be confident in your approach and read the question very carefully! Just solving the question doesnt make you safe, you should be more confident and stern that what you're saying is right so that the interviewer doesnt cross question everything you're saying!

Interview Questions (2)

Q1
String Rotation with Unordered Map
Data Structures & AlgorithmsMedium

A medium level string-unordered-map question with some tweaks in storing rotated order of string. The interviewer also asked about Time Complexity, Space Complexity, optimizations, and edge cases. Understanding the question was slightly tricky.

Q2
Median of All Subarrays Data Stream
Data Structures & AlgorithmsHard

Similar to the 'Median of a Data Stream' problem, but the data stream here consisted of all subarrays in order. The question was worded slightly more complicated, and it took me time to understand what it meant. I took too much time to understand the question and find the approach as it was relatively tougher than the original problem. I was able to get the solution by the end, and the code seemed to be perfect, but I was nervous and unsure about my approach.

Google Phone Screen | L3
google logo
Google
SDE IBanglore
August 1, 20254 reads

Summary

I had a phone screen for an L3 role at Google Bangalore where I was asked a graph reachability problem involving a corrupted node. I suggested a BFS approach and coded it, but received a rejection with feedback mentioning a brute-force approach.

Full Experience

Had my Google phone screen round in april for L3 role at Google Banglore. Interviewer was from Georgia and asked a simple question.

Question:
Given entry node, corrupted node and network of nodes, for each node check if it is reachable or not. corrupted node is node where incoming is possible but outgoing is not possible.

Exaple:

entry node : 5
corrupted node : 3
network : [
[3],
[2,3],
[1,4],
[0,1,4],
[2,3,5],
[4]
]

Output: [False,True,True,True,True,True]


Few constriant that I cleared from Interviewer:
  • entry node != corrupted node
  • network will be single component connected undirected graph
Suggested bfs approch. Written code once Interviewer agreed with approch. Interviewer didn't asked any follow-up, seemed satisfied with the solution.

Got a rejection call after few days, Feedback mentioned brute-force approch. Don't what went wrong. Would be helpful if anyone can share optimal approch for above problem.

Felt really dumb :(

Interview Questions (1)

Q1
Graph Reachability with Corrupted Node
Data Structures & Algorithms

Given entry node, corrupted node and network of nodes, for each node check if it is reachable or not. corrupted node is node where incoming is possible but outgoing is not possible.

Exaple:

entry node : 5
corrupted node : 3
network : [
[3],
[2,3],
[1,4],
[0,1,4],
[2,3,5],
[4]
]

Output: [False,True,True,True,True,True]


Few constriant that I cleared from Interviewer:
  • entry node != corrupted node
  • network will be single component connected undirected graph

Google Summer internship 2026 (Oncampus) - Rejected
google logo
Google
Summer internshipOncampus
July 25, 20253 reads

Summary

I interviewed for a Google Summer Internship 2026. After an Online Assessment and two technical rounds, I was unfortunately rejected.

Full Experience

My Google Summer Internship 2026 Interview Experience

Google visited our campus for the 2026 Summer Internship hiring. The process started with an Online Assessment (OA) consisting of 2 DSA problems. I was able to solve both completely, and based on my performance, I was shortlisted for the interview rounds.

📌 Technical Interview Round 1 – 45 Minutes
In the first round, the interviewer gave me a graph-based DSA problem. I approached the problem using Binary Search + BFS, explained my thought process clearly throughout the discussion, implemented the solution within the time limit, and also performed a dry run on the given example. The interviewer seemed satisfied with my approach and explanation.

After about 30 minutes, I received the link for the next round.

📌 Technical Interview Round 2 – 45 Minutes
This round focused on another DSA problem. The question involved an infinite sequence with a certain pattern, and I was asked to find the nth number in that sequence. While I was able to make some progress and share my approach, I couldn’t fully solve the problem within the time limit.

❌ Outcome
Unfortunately, after an hour, I got to know that I wasn’t selected for the internship.

Interview Questions (1)

Q1
Find Nth Number in Infinite Sequence with Pattern
Data Structures & Algorithms

The question involved an infinite sequence with a certain pattern, and I was asked to find the nth number in that sequence.

Google screening round
google logo
Google
July 24, 20253 reads

Summary

I had an initial screening round at Google where I was asked the Longest Duplicate Substring problem.

Full Experience

I had a initial screening round at Google where I was asked exactly same question.

Interview Questions (1)

Q1
Longest Duplicate Substring
Data Structures & Algorithms

I was asked the Longest Duplicate Substring problem.

Google Online Assessment summer Intern ' 26
google logo
Google
Summer Intern
July 22, 20252 reads

Summary

This post details an online assessment experience for a Google Summer Intern role in 2026, which included two distinct algorithmic challenges: 'K Criss-Cross' and 'Bits Transformation'.

Full Experience

Question 1

K Criss-Cross Problem Statement You are given:

An array of N integers: arr

An integer: P

Q queries, each containing two integers: A and K

For each query:

Add the value A to the array arr.

Find the K-th largest element X in the updated array.

Update P as: P=(P^X )mod(10^9+7) You need to determine the value of P after each query, and return the results.

Input You are given the following inputs:

An integer N: number of elements in the array

A list of N integers: arr

An integer P: initial value

An integer Q: number of queries

A list of Q queries, where each query is a pair of integers A and K

Output Return a list of Q integers, where each element represents the value of P after that query.

Question 2 :

Problem: Bits Transformation You’re given:

An array A of size N containing only 0s and 1s.

An integer K.

In one operation, you must flip exactly K elements in the array. Flipping means:

0 becomes 1

1 becomes 0

You can do this operation any number of times.

Your goal is to find the minimum number of operations needed to turn the entire array into all 1s.

If it's not possible, return -1.

Interview Questions (2)

Q1
K Criss-Cross
Data Structures & Algorithms

You are given:

An array of N integers: arr

An integer: P

Q queries, each containing two integers: A and K

For each query:

Add the value A to the array arr.

Find the K-th largest element X in the updated array.

Update P as: P=(P^X )mod(10^9+7) You need to determine the value of P after each query, and return the results.

Input You are given the following inputs:

An integer N: number of elements in the array

A list of N integers: arr

A list of Q queries, where each query is a pair of integers A and K

Output Return a list of Q integers, where each element represents the value of P after that query.

Q2
Bits Transformation
Data Structures & Algorithms

You’re given:

An array A of size N containing only 0s and 1s.

An integer K.

In one operation, you must flip exactly K elements in the array. Flipping means:

0 becomes 1

1 becomes 0

You can do this operation any number of times.

Your goal is to find the minimum number of operations needed to turn the entire array into all 1s.

If it's not possible, return -1.

[Offer] [Accepted] - Google L3 interview experience
google logo
Google
SWE 2, L3banglore1.5 yearsOffer
July 20, 202583 reads

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)

Q1
Implement File System Directory Structure
Data Structures & AlgorithmsMedium

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.

Q2
Print Next N Odd Numbers
Data Structures & AlgorithmsEasy

Given an integer t as a starting point, print the next n consecutive odd numbers following t.

Q3
Group and Sort Objects with Stable Order
Data Structures & AlgorithmsEasy

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).

Google | First Round | SWE III ML | Bengaluru
google logo
Google
SWE III MLBengaluru4 years
July 18, 20254 reads

Summary

I recently completed the first round for a SWE III ML position at Google in Bengaluru, which was a Data Structures & Algorithms coding interview. I was presented with two questions, an initial problem and an advanced follow-up, and shared my approaches for both.

Full Experience

Recently I gave round 1 for SWE III ML at Google, this was a dsa coding round. I have 4 years experience as a data scientist in a mid-size company. The interview was 45 minutes and was in the first week of July. I was asked a question and an advanced follow up on the same.

Initial Question

Given a list of events, each with a message and a timestamp. Please extract the most frequent one and give me its timestamps for further analysis.

Example ->

Event: ['error_1: 123', 'error_1: 234', 'error_2: 456'] Return: error_1 [123, 234]

My Answer

Initially I created a dictionary of events with list of timestamps as the values. For the maximum I was using a max heap but soon realised the heap is not needed and proceeded with coding the optimal solution with a max_counter.

class Solution:
  def returnMost_frequent_better(self, events):
    # O(n)
    event_dict = {}
    max_counter = 0
    max_key = None
    
    for event in events:
      key, value = event.split(':')
      value = int(value.strip())
      if key not in event_dict:
        event_dict[key] = [value]
      else:
        event_dict[key].append(value)
        
      if len(event_dict[key]>max_counter):
        max_counter = len(event_dict[key])
        max_key = key
    return event_dict[max_key]

Time complexity - O(n) for the dictionary creation

Advanced Question

For the follow up, imagine that it's going to become a realtime system, and I will maintain a queue of N such events. When the queue is full, I will remove the oldest event from the queue. Every time a new event comes in, I will update the structure and get the most frequent event among the N events.

Example ->

N=2 (queue size) Event: ['error_1: 123', 'error_1: 345'] event_element = 'error_1: 234' delete- 'error_1: 123' New_list= ['error_1: 345', 'error_1: 234'] return: error_1

My Answer

I actually misunderstood the question a bit and wrote a solution considering we have all the list of events and are not being passed one by one. Still was able to come up with a fair solution as given below. Here the major dilemma was how to update and maintain the max_counter when an element is deleted.

class Solution:
  def returnMost_frequent_better(self, events, N):
    # O(n)
    # We are passed all event_list and we handle >N, <N cases
    event_dict = {}
    max_counter = 0
    max_key = None
    time_heap = []
    for i, event in enumerate(events):
      key, value = event.split(':')
      value = int(value.strip())
      heapq.heappush(time_heap, (value, key))
      size+=1
      if size<N:
        if key not in event_dict:
          event_dict[key] = [value]
        else:
          event_dict[key].append(value)
        if len(event_dict[key]>max_counter):
          max_counter = len(event_dict[key])
          max_key = key
      else:
        val_d, key_d = heapq.heappop(time_heap)[1]
        event_dict[key].remove(val_d)
        size-=1
        new_max_key = None
        new_max = 0
        for key, val in event_dict.items():
          if len(val)>new_max:
            new_max_key = key
            new_max = len(val)
        max_key = new_max_key
    return max_key

I was later told that I misunderstood the question and was told to write down my assumption. Overall it went well, prepping for the further rounds now.

Interview Questions (2)

Q1
Extract Most Frequent Event and Timestamps
Data Structures & Algorithms

Given a list of events, each with a message and a timestamp. Please extract the most frequent one and give me its timestamps for further analysis.

Example ->

Event: ['error_1: 123', 'error_1: 234', 'error_2: 456'] Return: error_1 [123, 234]

Q2
Realtime Most Frequent Event in Bounded Queue
Data Structures & Algorithms

For the follow up, imagine that it's going to become a realtime system, and I will maintain a queue of N such events. When the queue is full, I will remove the oldest event from the queue. Every time a new event comes in, I will update the structure and get the most frequent event among the N events.

Example ->

N=2 (queue size) Event: ['error_1: 123', 'error_1: 345'] event_element = 'error_1: 234' delete- 'error_1: 123' New_list= ['error_1: 345', 'error_1: 234'] return: error_1

Google Interview L5 | India | Rejected
google logo
Google
SDE IIIIndia8 years
July 18, 20252 reads

Summary

I interviewed at Google for an L5 role in India but was rejected after the DSA rounds. Despite what I perceived as relatively easier questions, I struggled with effectively explaining my thought process and handling interviewer interactions. The overall hiring process was notably slow, spanning over a year.

Full Experience

Recruiter reached out to me via LinkedIn in 2023. The process was painfully slow. This is from Nov, 2024 till June, 2025. I got rejected in the DSA rounds and didn't make it to the system design round. I have 8 YOE.

I got relatively easier questions and still managed to mess it up by not explaining my thought process properly.

Googleyness: The common Googleyness questions.

DSA Round 1:

Exact same question and I gloriously f*ed it up. Not blaming the interviewer at all, I wouldn't have cleared this round anyway but the interviewer was not responsive at all. He came late and gave the question. I asked him a clarifying question and he said let me check, I have forgotten. Then he read something and answered. In general, he wasn't responsive at all but I could have handled this better.

DSA Round 2: https://leetcode.com/problems/top-k-frequent-elements/description/ Question was very similar to this. It was worded as some search words are given and you need to find some top frequent elements and lots of ambiguities were there. I asked clarifying questions. The interviewer was pushing me hard to come up with the Bucket sort and then Trie solution.

The interviewer was so nice. I enjoyed this round. Felt more like a discussion.

DSA Round 3: Given a > b, b > c (Valid) or a> b, b > c , c > a (Not valid)

List of List of String is given with each list having 2 elements eg. a and b. ">" is the only relation b/w them. Find out if it is valid or not.

I should have given the detect cycle solution first but I feel I jumped too quickly to Kahn's as I was expecting the follow up to be finding the order. The follow up was that that but I didn't explain too well. I was trying to communicate with the interviewer but he stopped and told me you are driving this and do what you feel like. And I panicked to say the least! Again, I should have handled this better.

If you came to the post for the questions then you may stop reading here. And all the best!!

Some random thoughts

Process was painfully slow and recruiter didn't respond for 2 months in between. At this point, I thought I was ghosted and stopped preparing but she reached back again with another round of interview. I was preparing on/off during the 1.5 years as I kept losing interest. That was a mistake I made. Luckily, I got into another FAANG while preparing for Google. I am currently happy with the role. I want to focus on the job and my health (which I neglected) and a second source of income given how the market is. The recruiter asked me to reach back again after 6 months (which I think they do for everyone).

Interview Questions (3)

Q1
Top K Frequent Words
Data Structures & AlgorithmsMedium

The exact same problem as found at the given LeetCode link.

Q2
Top K Frequent Elements
Data Structures & AlgorithmsMedium

Question was very similar to https://leetcode.com/problems/top-k-frequent-elements/description/. It was worded as some search words are given and you need to find some top frequent elements with lots of ambiguities. I asked clarifying questions.

Q3
Detect Cycle in Relational Dependencies
Data Structures & AlgorithmsHard

Given a > b, b > c (Valid) or a> b, b > c , c > a (Not valid)

List of List of String is given with each list having 2 elements eg. a and b. ">" is the only relation b/w them. Find out if it is valid or not.

Preparation Tips

Thanks a lot to the community for helping me during the preparation! This is the smallest way I can give back. I was preparing on/off during the 1.5 years as I kept losing interest, which I consider a mistake I made.

Google Onsites L4 | India
google logo
Google
L4 positionIndia
July 17, 20258 reads

Summary

I interviewed for an L4 SDE position at Google in India, completing a phone screen and three onsite rounds. While I solved most problems, I have mixed feelings about the outcome, especially after struggling with a follow-up question, and I'm not expecting positive feedback.

Full Experience

Hi, I appeared for the 3 onsite rounds for L4 position. Currently working as an SDE 2 at Amazon.

Phone Screen: Oncall schedule problem. Given a list of items {name, startTime, endTime} find out the oncall schedule.

Experience: Solved it but I took my sweet time. So, I think I got "bad-positive" rating.

Anyways, moved to the onsites.

Onsite R1: Similar to range module question. The difference is: support only union queries, search queries but for a number rather than a range

Experience: Solved it. Interviewer pointed a bug and I fixed it immediately. He asked if the run-time analysis is going to be same after fixing the same. I verified and said yes. But, not sure, if that was the answer he was looking for. Expecting LH / LNH here.

Onsite R2: Swap adjacent in LR string but worded differently.

Experience: Solved it. Interviewer asked me to write some corner cases I can think of. Wrote a few. Then he said he was done with the questions. I asked him if there will not be any follow-ups / another question but he said he had prepared only 1. Expecting H here (I might be feeling ambitious though.)

Onsite R3: Given edges and a list of vertices, find all the nodes that you can go to from the given vertex.

Follow up 1: What if there are redundant searches. Follow up 2: Given a list of vertices return only the minimum set of vertices that you need in a way that using those you can traverse the rest of nodes from your input list.

Experience: Solved Q1 and the first follow up. For the second approach, interviewer gave me a hint but I couldn't catch it. Also, they were rushing me to arrive at a solution. So couldn't answer this.

They said that Google has the smartest bunch compared to companies like Amazon or Apple. So I have a feeling that they might be thinking that I am not smart enough / cut for google. So might not be receiving a positive feedback. Expecting LNH.

Googlyness was not yet scheduled. I am not expecting anything either for some reason.

Hoping for the best.

Thanks and good luck guys!

Interview Questions (6)

Q1
Oncall Schedule Problem
Data Structures & Algorithms

Given a list of items {name, startTime, endTime} find out the oncall schedule.

Q2
Range Module with Union & Number Search
Data Structures & Algorithms

Similar to range module question. The difference is: support only union queries, search queries but for a number rather than a range

Q3
Swap Adjacent in LR String (Wording Differently)
Data Structures & Algorithms

Swap adjacent in LR string but worded differently.

Q4
Find Reachable Nodes in Graph
Data Structures & Algorithms

Given edges and a list of vertices, find all the nodes that you can go to from the given vertex.

Q5
Reachable Nodes - Redundant Searches
Data Structures & Algorithms

What if there are redundant searches.

Q6
Minimum Set of Vertices to Traverse All Nodes
Data Structures & Algorithms

Given a list of vertices return only the minimum set of vertices that you need in a way that using those you can traverse the rest of nodes from your input list.

Google L4 Interview Experience
google logo
Google
SDE II
July 14, 20253 reads

Summary

I interviewed for an L4 position at Google, completing a pre-screening and three onsite rounds. The interviews covered API implementations for restaurant table allocation and a chat system, an IP address to city mapping problem, and a modified greedy/knapsack type question. I was rejected after the third onsite round.

Full Experience

Recruiter from Google's Talent Acquisition Partner companies reached out via call.

Pre - screeing Round

  • Interviewer was from Switzerland (about 35y)
  • Asked a question to implement few APIs for Restaurant table allocation.
  • JoinWaitlist() (A group of people will join the restaurant waitlist)
  • LeaveWaitlist()
  • AllocateTable(int size) => Allocate the table to the first group which has a groupsize = size, if no such group allocate to size-1,-2 etc.
  • It was not that difficult I would rate the difficulty somewhere between implementing a LRU Cache and LFU Cache.
  • Feedback - Very good

Onsite Round 1

  • Interviewer from Bangalore/Hyderabad (about 28y)
  • Implement few Chat related APIs (I dont exactly remember)
  • You have kind of a fream of messages of format
  • (From, To, Message),(From, To, message)...
  • Needed to implement APIs like
  • UserWithMostChats()
  • DeleteUser() => (all chats should be removed from other users as well)
  • Some other APIs I dont remember
  • This was also not that difficult
  • Feedback : Good

Onsite Round 2

  • Interviewer from Bangalore/Hyderabad (about 40-45y)
  • Given Ip address ranges and their corresponding city
  • (IP_Start, IP_End, "Arizona"),... etc
  • You will be given an IP address find which city it belongs to
  • Binary search question, asked in google interviews several times
  • I though it will be very simple
  • Got kind of confused while writing high/low update conditions, missed 2 edge cases also :(
  • Feedback : Bad (Comment : Missed edge cases, quoted wrong Time Complexity (Dont when when this happened!))

Onsite Round 3

  • Interviewer from Bangalore/Hyderabad (about 28y)
  • Started with simple greedy question (almost same as fractional knapsack)
  • Modified it to be a Heap based greedy question
  • I arrived at the optimal solution during discussion but there was no time to code it.
  • Feedback : Bad (Comment: Didnt leave enough time to complete question)

Rejected after this, Round 4 didnt happen (Behavioral)!

Interview Questions (3)

Q1
Restaurant Table Allocation System
Data Structures & AlgorithmsMedium

Implement APIs for a restaurant table allocation system:

  • JoinWaitlist(): A group of people will join the restaurant waitlist.
  • LeaveWaitlist()
  • AllocateTable(int size): Allocate a table to the first group which has a group size = size. If no such group exists, allocate to a group with size-1, size-2, etc.
Q2
Chat System APIs
Data Structures & AlgorithmsMedium

Given a stream of messages in the format (From, To, Message), implement the following APIs:

  • UserWithMostChats(): Return the user who has sent or received the most chats.
  • DeleteUser(): All chats involving this user should be removed from other users as well.
Q3
IP Address to City Mapping
Data Structures & AlgorithmsMedium

Given a list of IP address ranges and their corresponding cities (e.g., (IP_Start, IP_End, "Arizona"),... etc), implement a function that, given an IP address, finds which city it belongs to.

Google Early Career II (US) Onsite
google logo
Google
Early Career IIUS
July 12, 20257 reads

Summary

I had an onsite interview for an Early Career II role at Google in the US, which included a phone screen and two onsite interviews with specific data structure and algorithm questions.

Full Experience

Phone Screen - 45 Min

Q - You’re given an endless stream of integers and a non-negative threshold d; your job is to pull off three numbers as soon as they “fit together,” meaning the difference between the smallest and largest of the three is at most d, discard those three so they can’t be reused, and continue until the stream ends, returning the list of all triplets in the order they were completed

d = 2 inputStream: [10, 5, 7, 6, 8, 3, 4, 1, 2] Result - [[5, 6, 7], [1, 2, 3]]

Interview 1 - 45 Min

Q - Given a directed graph of n nodes labeled from 0 to n-1, find the minimum number of edges in any path from a start node A to a target node B, excluding any “obstacle” nodes through which traversal is forbidden. If no such path exists, return -1.

Interview 2 - 45 Min

Q - Merged Interval (Tweaked a little)

Interview Questions (3)

Q1
Find Triplet in Stream with Threshold
Data Structures & Algorithms

You’re given an endless stream of integers and a non-negative threshold d; your job is to pull off three numbers as soon as they “fit together,” meaning the difference between the smallest and largest of the three is at most d, discard those three so they can’t be reused, and continue until the stream ends, returning the list of all triplets in the order they were completed

d = 2 inputStream: [10, 5, 7, 6, 8, 3, 4, 1, 2] Result - [[5, 6, 7], [1, 2, 3]]

Q2
Minimum Edges in Graph Path Excluding Obstacles
Data Structures & Algorithms

Given a directed graph of n nodes labeled from 0 to n-1, find the minimum number of edges in any path from a start node A to a target node B, excluding any “obstacle” nodes through which traversal is forbidden. If no such path exists, return -1.

Q3
Merged Intervals (Tweaked)
Data Structures & Algorithms

Merged Interval (Tweaked a little)

Google SDE-3 interview Experience
google logo
Google
SDE-34 years
July 8, 20252 reads

Summary

I shared my Google SDE-3 interview experience, which included a screening round with an API concurrency problem and follow-up, followed by three Data Structures & Algorithms rounds covering specific LeetCode problems and an Object-Oriented Design question, with my result still pending.

Full Experience

Hi all! I’d like to share my Google interview experience in case it helps someone who’s currently preparing or going through a similar phase. 🔹 Quick Background I have around 4 years of experience, primarily as a Frontend Developer working with the React.js tech stack. My main programming language is JavaScript. To be honest, I wasn't very consistent with LeetCode, and only began solving problems regularly when I started preparing for this interview — because like many, Google has always been one of my dream companies. 🔹 Getting the Call A recruiter reached out to me via LinkedIn, and I requested one month to prepare. They were kind enough to accommodate and even rescheduled the interviews multiple times 🫤 . Kudos to the Google recruiting team for being so supportive throughout the!

🧪 Round 1: Screening / Elimination Round This was the initial elimination round, and I’m glad to say I cleared it.

	○ Duration: (e.g., 45 minutes)

Question : Implement the function "GetTotalCount(num_docs: int)", which returns the total number of words in documents with ID numbers in the range [0, num_docs).

E.g. GetTotalCount(5) -> # words for docIds 0,1,2,3 and 4 return the sum of those # words.

Candidates have the following Web API available to retrieve the number of words in a document id.

https://www.count-words.com/document/?worker_id=

Response: { count: <# of words for document-id> }

worker_id = there are infinite worker and the worker_id is a non-negative integer [0, infinity). One worker can perform only one computation at a time.

https://www.count-words.com/document/1?worker_id=1 --> trigger #words on worker 1 for docId 1 https://www.count-words.com/document/2?worker_id=1 --> Cause an error if the above call is in progress. --> If that call is finished, trigger #words for docId 2 on worker 1 => It could take a long time for the a API call to finish (for e.g. if doc has a lot of words).

Follow-up: "GetTotalCount(num_docs: int, num_workers: int)" where num_worker is the max workers that available with ids [0, num_workers).

GetTotalCount(5, 3) => Have to get # words for docIds [0, 1, 2, 3, 4 using workerIds [0, 1, 2].

Selected in Round 1

Round 2 , 3, 4 - All three are DSA round (45 minutes : The interview is strictly limited to 45 minutes, and the recruiter won’t allow even a single extra second.)

Interview 1 : https://leetcode.com/problems/car-pooling/description/

Interview 2 : https://leetcode.com/problems/sequence-reconstruction/description

Interview 3 : Based on OOPs concepts Create an online match-making algorithm that receives players and dispatches a call to a game server when it finds players with close enough skill ratings to play against each other.

Specifically, the candidate should create a class MatchMaker with a single public method to a add a player to the match-making logic. They can assume that a class GameServer with a StartGame(player1, player2) function, as well as a class Player with a GetRating() function already exist.

Players should be added to a match as soon as a valid match is found and not wait for a more optimal match coverage solution that may occur with additional players.

The max skill rating difference allowed is the same for all games (the candidate may assume that they can get this via the MatchMaker constructor, but a global constant is also acceptable), and should be inclusive.

Result is still pending ...

Interview Questions (4)

Q1
GetTotalCount with Concurrent API Calls
System Design

Implement the function "GetTotalCount(num_docs: int)", which returns the total number of words in documents with ID numbers in the range [0, num_docs).

E.g. GetTotalCount(5) -> # words for docIds 0,1,2,3 and 4 return the sum of those # words.

Candidates have the following Web API available to retrieve the number of words in a document id.

https://www.count-words.com/document/?worker_id=

Response: { count: <# of words for document-id> }

worker_id = there are infinite worker and the worker_id is a non-negative integer [0, infinity). One worker can perform only one computation at a time.

https://www.count-words.com/document/1?worker_id=1 --> trigger #words on worker 1 for docId 1 https://www.count-words.com/document/2?worker_id=1 --> Cause an error if the above call is in progress. --> If that call is finished, trigger #words for docId 2 on worker 1 => It could take a long time for the a API call to finish (for e.g. if doc has a lot of words).

Follow-up: "GetTotalCount(num_docs: int, num_workers: int)" where num_worker is the max workers that available with ids [0, num_workers).

GetTotalCount(5, 3) => Have to get # words for docIds [0, 1, 2, 3, 4 using workerIds [0, 1, 2].

Q3
Sequence Reconstruction
Data Structures & Algorithms
Q4
Online Match-Making Algorithm (OOP Design)
System Design

Based on OOPs concepts Create an online match-making algorithm that receives players and dispatches a call to a game server when it finds players with close enough skill ratings to play against each other.

Specifically, the candidate should create a class MatchMaker with a single public method to a add a player to the match-making logic. They can assume that a class GameServer with a StartGame(player1, player2) function, as well as a class Player with a GetRating() function already exist.

Players should be added to a match as soon as a valid match is found and not wait for a more optimal match coverage solution that may occur with additional players.

The max skill rating difference allowed is the same for all games (the candidate may assume that they can get this via the MatchMaker constructor, but a global constant is also acceptable), and should be inclusive.

Preparation Tips

To be honest, I wasn't very consistent with LeetCode, and only began solving problems regularly when I started preparing for this interview — because like many, Google has always been one of my dream companies. I also did lots of research, reviewing other interview experiences, and noted that graph topics—particularly DFS, BFS, and Topological Sort—are considered mandatory for interviews.

Google | Interview Experience onsite | Rejected
google logo
Google
Rejected
July 6, 202536 reads

Summary

I had an onsite interview experience with Google which involved four rounds primarily focused on Data Structures & Algorithms. Despite passing some rounds strongly, I was ultimately rejected after failing to provide an optimal solution in the final technical round.

Full Experience

I was contacted by a Google recruiter via LinkedIn for an onsite interview opportunity. There was no initial assessment round. My interview process consisted of four rounds.

Round 1: Screening Round

The first round focused on data structures and algorithms. I was asked a question about finding the shortest path in a graph, followed by a modification where obstacles were added. I successfully passed this round.

Round 2: DSA Round

In this round, I was challenged to build a movie recommendation system. Given a movie graph containing names and ratings, the task was to return a list of similar top N movies. I was able to provide an optimal solution, although I did receive some hints for space optimization. The verdict for this round was 'Hire' or 'Low Hire' due to the hints I took.

Round 3: DSA Round

This round also focused on DSA. I was given an array of strings and asked to group strings that are 'buddies' to each other. Two strings are considered buddies if they have equal length and each character has the same distance from its corresponding character (for example, 'aab' and 'bbc' are buddies). I performed well and received a 'Strong Hire' verdict.

Round 4: DSA Round

The final technical round involved a binary tree problem. I needed to determine if, given a binary tree and a possible path range [lmin, lmax], there was any path whose node sum equaled kSum. This was similar to LeetCode's Path Sum III. Unfortunately, I couldn't provide an optimal solution during the interview, only an exponential recursive brute force. I solved it later with O(h) time complexity. The verdict for this round was 'No Hire'.

After completing all rounds, I was ultimately rejected.

Interview Questions (4)

Q1
Graph Shortest Path with Obstacles
Data Structures & Algorithms

First, I was asked to find the shortest path in a graph. The follow-up extended this by adding obstacles.

Q2
Movie Recommendation System
Data Structures & Algorithms

I had to build a movie recommendation system given a movie graph. The graph has movie names and ratings, and the task was to return a list of similar top N movies.

Q3
Group Buddy Strings
Data Structures & Algorithms

Given an array of strings, I needed to group strings that are 'buddies' to each other. Two strings are considered buddies if they have equal length and each character has the same distance from its corresponding character (for example, 'aab' and 'bbc' are buddies).

Q4
Binary Tree Path Sum in Range
Data Structures & Algorithms

Given a binary tree and a possible path range [lmin, lmax], determine if there is any path with a sum of nodes equal to a specific kSum. This problem was similar to LeetCode's Path Sum III.

Google L4 | Phone Screen | Reject
google logo
Google
SDE II
July 6, 20255 reads

Summary

I had a phone screen interview for an L4 role at Google where I was asked to merge two screenshots. I initially misunderstood the problem and later struggled to optimize my brute-force solution, ultimately leading to a rejection.

Full Experience

The interviewer joined and directly jumped into the question. He verbally told me the problem statement, which you see in the first two lines of the question. No input/output was given. Just:

Given two screenshots of a single web page. Return single long screenshot merging both given screenshots with no overlapping content. 

I misunderstood the question, thinking of two arrays instead of two 2D matrices. Later, the interviewer wrote the example input and output. I wasted 10 minutes here due to the open-ended problem statement. Yes, a screenshot is a 2D grid with pixels, but it didn't strike me at that moment.

Then I explained my solution (brute force):

The idea is: if the bottom rows of screen1 match the top rows of screen2 (in the same order), remove those overlapping rows from screen2 only before merging.

He agreed and asked me to write the time complexity. I wrote it as O(h * h * w), and he mentioned it was correct. This discussion went on for 15 minutes. I thought I could start coding now. But he stopped me and asked me to optimize it.

I fumbled a lot here. I was thinking about whether I could optimize it to avoid any recalculations. I was going completely in the wrong direction, and I felt the interviewer didn't help me much here. I wasn't getting any other ideas and told him I would write the brute-force solution first and then see if I could optimize it, as I might get some ideas while looking at the code. He initially didn’t agree, but since only 10–13 minutes were left, he agreed. I understood I had already lost the opportunity, but I didn’t give up. I quickly started writing the code, hoping to find some optimization, but I ran out of time.

After the interview, I asked ChatGPT the same question. It also gave the same solution (brute force) with the same time complexity. Then I asked it to optimize, and it gave a slightly optimized solution using precomputed hashes for each row, reducing the time complexity to O(h * w + h * h). You can see the code & conversation here with ChatGPT. This is not a huge deal, but it was still my fault for not even mentioning the precomputed hash optimization. I genuinely don't know if the interviewer was expecting this or some other optimization. What do you think?

Interview Questions (1)

Q1
Merge Two Screenshots
Data Structures & Algorithms

QUESTION: Merge Two Screenshots Given two screenshots of a single web page. Return single long screenshot merging both given screenshots with no overlapping content.

A single screenshot refers to a h*w grid/matrix, where h is the height of the screen and w is the width of screen. When scrolling a web page assume may or may not some screen content can overlap.


Example Input:

Screen 1:

[1  2  3]
[4  4  5]
[6  7  8]
[9 10 11]

Screen 2:

[6  7  8]
[9  10  11]
[13  14  15]
[16 17 19]

Output:

[1  2  3]
[4  4  5]
[6  7  8]
[9 10 11]
[13  14  15]
[16 17 19]

Here h = 4, w = 3


Preparation Tips

UPDATE: Thanks all for you inputs in comments. Seems KMP is the correct solution to this problem. Feeling this template now. Covered most of the data structures and alogrithms for google but skipped this KMP algo and it costed me and I paid the price. To everyone who is preparing for Google, BE PREPARED IN EVERY TOPIC.

Google SWE Intern 2026 OA questions
google logo
Google
SWE Intern
July 5, 20253 reads

Summary

This post details the two algorithmic problems encountered during my Google SWE Intern 2026 Online Assessment.

Full Experience

Problem 1: You have an array A of length n, where each element is either 1, 2 or 3. You will be given q queries. In the i‑th query you’re given two integers x and y:

x (1 ≤ x ≤ n): the index in the array to update

y ∈ {1, 2, 3}: the new value to assign

After performing the update A[x] ← y, you must compute and print the minimum number of swaps (each swap exchanges two elements at arbitrary positions) required to sort the entire array in non‑decreasing order. Constraint 1 <= n <= 1e5 1 <= q <= 1e5 A[i]∈ {1, 2, 3} Problem 2:

You’re given an integer array A of length n. A subsequence is any sequence you get by deleting zero or more elements (without reordering). We want to count how many subsequences of A satisfy both of these parity‑run constraints:

No three evens in a row: You never pick three consecutive elements in your subsequence that are all even numbers.

No three odds in a row: You never pick three consecutive elements in your subsequence that are all odd numbers.

Compute the total number of non‑empty valid subsequences.

Constraint 1 <= n <= 1e5 1 <= A[i] <= 1e9

Interview Questions (2)

Q1
Minimum Swaps to Sort Array of 1s, 2s, 3s After Updates
Data Structures & Algorithms

You have an array A of length n, where each element is either 1, 2 or 3. You will be given q queries. In the i‑th query you’re given two integers x and y:

x (1 ≤ x ≤ n): the index in the array to update

y ∈ {1, 2, 3}: the new value to assign

After performing the update A[x] ← y, you must compute and print the minimum number of swaps (each swap exchanges two elements at arbitrary positions) required to sort the entire array in non‑decreasing order. Constraint 1 <= n <= 1e5 1 <= q <= 1e5 A[i]∈ {1, 2, 3}

Q2
Count Valid Subsequences with Parity-Run Constraints
Data Structures & Algorithms

You’re given an integer array A of length n. A subsequence is any sequence you get by deleting zero or more elements (without reordering). We want to count how many subsequences of A satisfy both of these parity‑run constraints:

No three evens in a row: You never pick three consecutive elements in your subsequence that are all even numbers.

No three odds in a row: You never pick three consecutive elements in your subsequence that are all odd numbers.

Compute the total number of non‑empty valid subsequences.

Constraint 1 <= n <= 1e5 1 <= A[i] <= 1e9

Google(L4) Interview Experience
google logo
Google
SWE(L4)
July 2, 20253 reads

Summary

I interviewed for an SWE L4 role at Google. After multiple coding, Googlyness, and team-fit rounds, despite positive feedback on coding, the position was ultimately filled internally, and I did not receive an offer.

Full Experience

Recently I interviewed for SWE(L4) role at Google, and I wanted to share the experience.

Recruiter initially reached out to me on LinkedIn and scheduled a phone call for 2 days later. The phone call went on for almost 35-40 mins. During this conversation he asked me to rate myself in Coding, discussed about different projects I have worked on, why do I want to join google, On which products I want to work in google etc. After this discussion he asked me, how much time I want to take in order to prepare well. I asked for 2 weeks. At last he told me that he'll share a form and interview schedule. I was waiting for the interview link but didn't get. After 1.5 weeks I received a mail from recruiter saying that he won't be in loop with my interview schedules and a different recruiter (name xyz) will be looking into my profile.

Current Recruiter(xyz) asked me for time to prepare and I asked for 2 weeks again, And xyz scheduled 3 onsite rounds (I was skipped phone screen round, lucky me). 5 days prior to interviews I asked for 1 more week and the recruiter agreed, and rescheduled the interviews.

Fast forward to interview date.

Onsite round 1: https://leetcode.com/problems/separate-squares-i/description/

Wording were different, stating array of cakes (sqare sized) are put on a table having x and y co-ordinates. A horizontal blade is swinging and you need to stop horizontal blade such that total area of cakes get divided into two equal parts. input : (x,y, size_of_cake)

Experience: Positive I started with follow-ups like, will the cakes be centrally placed, what if there are multiple positions at which blade can be stopped then what would be the answer in that case. About all the follow-ups he asked me to assume however I like. I came up with the binary search approach and Wrote the working code (written only required function).

Follow-up: What if Y is too large, On which I said in real world scenarios it will loop for 60-70 times, on which he said what if correctness is upto multiple decimal points. On which I talked about ternary search, to which he said, that's what I was expecting.

Onsite round 2:

crux of the question: There are multiple routers placed, having description (name:string,pos_x:double, pos_y:double). Each router can transmit to a distance of dis:double, I was asked to find whether router_A(could be any) can transmit message to router_B(could be any).

Experience: Not so good

Interviewer voice was not so clear, so I was having difficulty listening to him, I took a lot of time to understand the question and clarifying my doubts, and came up with bfs solution, after that he asked me to code.

On the footsteps of 1st round I tried to write the required function only (and here the things got complicated). He started asking multiple questions while writing code, like you are creating adjacency graph multiple times(that's how we do in leetcode, if questions are not about mutiple queries :)). Finally I started writing class based implementation.In the meantime he prompted that write code fast since he has follow-up questions. Anyway I was able to complete the code 3 mins prior. But interviewer didn't ask follow-ups stating time is almost complete and interviewer didn't seem so happy :(

Onsite round 3:

Given a list of key_value something like this: [{"x", "ab"}, {"kz", "kabl"}, {"xk", "bl"}] and a key (%kz%_p%xk%) what would be the answer. In the above case answer would be : "kabl_pbl"

basically keys would be wrapped b/w modulo operator.

Experience: Great I started with clarifying questions like, what if modulos are not even (won't be the case), what if keys b/w modulos are not present (if not present throw error) etc..

I iterated my solution with the test case, after iterating after my test case, he added on more test case: [{"x", "ab"}, {"kz", "kabl"}, {"xk", "%x%bl"}] and asked me to find the answer for this: (%kz%_p%xk%).

answer would be: "kabl_pabbl"

I came with a recursive solution, and he asked me to implement it.

Learnt from the previous round, I started with class based solution and written the helper method.

Follow up 1: After writing the code, he asked me what if certain keys are repeated multiple times inside a value, eg: %kz%_p%xk%%xk%%xk%%xk%%xk%%xk%%xk%%x%xk%%xk%%xk%

I added memoization in my recursive solution and he was happy.

Follow up 2: What if key_x depends on key_y and key_y depends on key_x, how would you handle that.

On which I replied, I will create an adjacency graph at the start, and apply cycle detection algorithms like DSU, and asked him if he wants me to write code, on which he replied not necessary, and said he just wanted to know the thinking process.

After 3rd round recruiter informed me that feedback is positive, and need to schedule googlyness round.

Googlyness round: basic HR questions like, how will you respond if someone steals your credit, how will you approach if you don't know something and you need to ask from senior or vice-a-versa etc..

After Googlyness, recruiter told that he'll schedule a Team-fit call round, and he got the buy-in from a manager in 2 days only.

Team fit (Director): Instead of manager, Director joined the call and we talked about 30 mins about the project i'm going to work on, and what have I worked on in previous companies, at last he told that, he is setting up a new team, and the manager under which I'll work is switching internally and will start officially in this team in 2 weeks, so my to-be manager will also talk to me.

Team fit(Reporting manager): To be manager, joined the call and we discussed for almost 45 min about the project i have worked on , and what i'll be working on this team, and I was pretty sure that I'm going to join this team, but that didn't happen.

I asked the recruiter, and he kept on saying that he didn't recieve the fit-call round feedback yet. After 2 weeks recruiter reached out to me on mail asking about some additional info like, legal name, promotion history, companies i worked for, expected salary etc, and it was mentioned in the mail that he'll let me know about the outcome in coming week. At this point of time I was sure that manager has given the positive feedback and maybe offer drafting is in progress that's why 1 week of time is required.

Meanwhile I kept on asking my recruiter whether my profile has passed the Hiring Committee round or not, which he ignored :(

After 1 week I ping the recruiter only to get my hopes shattered. Recruiter informed me that position has been filled internally, and the he'll try to map me with some other team.

Hoping to get matched with a team and get an offer soon :)

Interview Questions (4)

Q1
Divide Cakes into Two Equal Areas with Horizontal Blade
Data Structures & Algorithms

Given an array of cakes (square sized) on a table with x and y coordinates, and a horizontal blade is swinging. You need to stop the horizontal blade such that the total area of cakes gets divided into two equal parts. Input: (x,y, size_of_cake).

Follow-up: What if Y is too large, and correctness is required up to multiple decimal points?

Q2
Router Connectivity Check
Data Structures & Algorithms

Given multiple routers, each described by (name:string, pos_x:double, pos_y:double). Each router can transmit to a distance of dis:double. I was asked to find whether a given router_A can transmit a message to router_B (where A and B could be any routers).

Q3
Key-Value String Substitution with Nested References
Data Structures & Algorithms

Given a list of key-value pairs (e.g., [{"x", "ab"}, {"kz", "kabl"}, {"xk", "bl"}]) and a key pattern (e.g., "%kz%_p%xk%"), what would be the answer? Keys are wrapped between modulo operators. Example output for "%kz%_p%xk%" is "kabl_pbl".

An additional test case was provided: [{"x", "ab"}, {"kz", "kabl"}, {"xk", "%x%bl"}] and key pattern: "%kz%_p%xk%". The expected answer: "kabl_pabbl".

Follow-up 1: What if certain keys are repeated multiple times inside a value, e.g., "%kz%_p%xk%%xk%%xk%%xk%%xk%%xk%%xk%%x%xk%%xk%%xk%"?
Follow-up 2: What if key_x depends on key_y and key_y depends on key_x (cyclic dependency)? How would you handle that?

Q4
Behavioral/Googlyness Questions
Behavioral

Basic HR questions were asked, such as: How will you respond if someone steals your credit? How will you approach it if you don't know something and you need to ask from a senior or vice-a-versa?

Preparation Tips

I asked for two weeks to prepare initially for the coding rounds, and later requested an additional week for the onsite interviews.

Google SWE II (L3) | Phone Screening round | April | 2025
google logo
Google
SWE II (L3)2 yearsOngoing
July 2, 202544 reads

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)

Q1
Find Duplicates in Ancestors
Data Structures & AlgorithmsMedium

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).

Q2
Find Duplicates within K Ancestors
Data Structures & AlgorithmsMedium

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.

Google India L4 MLE Interview experience
google logo
Google
L4 MLEIndia5 years
July 2, 20255 reads

Summary

I recently interviewed for an L4 MLE role at Google India. Despite clearing the phone screen and one DSA onsite round, I received negative feedback on the second DSA and ML rounds, ultimately not securing the position.

Full Experience

Hi All,

I want to share my experience from my recently concluded Google interviews for MLE role to give back to the community which has helped me prepare for my Google dream.

Interview Process:

  1. Phone Screen (DSA) - this round is elimination round.
  2. 2 DSA rounds
  3. 1 ML round
  4. 1 Googlyness

Timeline: Recruiter reached out through linkedin around early April -> Phone screen one month later -> Onsites one month later. All onsites done within a week.

Questions: 1. Phone screen: https://leetcode.com/discuss/post/6626514/google-l3-tpsmarch-by-bhima2001-x7jv/

Exact same question with same follow up. Solved the first question quickly within 25 mins, discussed the approach for the follow up in the next 10 mins. Interviewer did not want me to code it up. Interview was over in 35 mins, last 10 mins I had a good discussion with the interviewer on their work. Result: Positive, moving to onsites.

2. Onsites R1 (DSA): It was a relatively easier question. You are given a list of sentences. Design an API which takes one word as an input and predicts the next word based on the sentences provided. E.g. Sentences = [["I","AM","SAM"], ["SAM","LIKES","ICECREAM"], ["I","AM","TALL"], ["I","WANT","COOKIE"]] For the first part, the predicted word should be the most frequent word that appears next to the input word in the sentences. For e.g: Input: "I", Output: "AM"

Follow up: Randomly pick the next word based on the probability. Probability is calculated as: Frequency of a word/Total count of words.

E.g: For the input "I", there are 2 next words in the example - "AM" and "WANT". Probability of "AM" : 2/3 and probability of "WANT": 1/3

This is very similar to this question on leetcode - https://leetcode.com/problems/random-pick-with-weight/description/

I solved the first part optimally using hashmap, tracking the most frequent next word for each word. Solved the follow up quickly as well and covered the edge cases (there were many).

Result: Positive

3. Onsites R2 (DSA): Word to word - https://codeforces.com/problemset/problem/448/C

This was a tough round. The interviewer just pasted the question and did not want me to discuss anything but just solve it in 35 mins. I still kept him engaged because I had seen this question a while back and I knew it was a tricky one. Keeping him engaged really helped as I corrected my approach through his verbal and non-verbal feedback. I quickly came up with the Divide and Conquer approach and the interviewer was quite impressed by that and asked me to code it up. However while coding, I realised there are a lot of things to consider. I juggled with the right approach and landed very close to the optimal (O(N2)) solution by the end of the interview, but there were a few more optimizations that were required.

Resut: Negative. Not sure if the interviewer expected the linear complexity solution for this which uses segment trees. My O(N2) solution was pretty close to optimal but still got negative rating

4. Onsites R3 (ML): This was again a very surprising round for me. I had spent a lot of time preparing for ML system design rounds but this was on completely different lines. I had specifically asked my recruiter to arrange a call with a Google MLE to get an understanding before this round but none of his advise resembled the problem I was given. I am choosing to not reveal the problem as I believe it could easily reveal my identity because I don't think many people are asked this type of question for ML rounds. Also there's no benefit in preparing for this type of problem because chances of getting asked such questions are very very low. Generally it's a system design round for ML such as content moderation, video recommendation etc. but this was a problem which is an active area of research. The solution required a combination of Topo sort + ML.

Result: Negative. I identified topo sort solution pretty quickly and did fairly well on the follow up, but it seems that the interviewer was expecting me to come up with the exact solution to this problem.

Got a call few days later that I did not make it. Googlyness did not get scheduled. I asked for another DSA round to make up for the 2nd DSA round but the recruiter said it's not possible given the ML round rating is also not very positive.

While the result this time did not turn out in my favor, I have my head held high for making it this far into the very rigorous Google interview process. From not giving myself more than 5% odds of success when I started to actually feeling like I have a shot at qualifying by the end has been one hell of an experience. It sucks to get this close to such an amazing opportunity but missing just enough to go back to where you started. I guess life is going to suck for a few days and then we move on to better things.

Interview Questions (1)

Q1
Next Word Prediction API Design
Data Structures & AlgorithmsMedium

You are given a list of sentences. Design an API which takes one word as an input and predicts the next word based on the sentences provided. E.g. Sentences = [["I","AM","SAM"], ["SAM","LIKES","ICECREAM"], ["I","AM","TALL"], ["I","WANT","COOKIE"]] For the first part, the predicted word should be the most frequent word that appears next to the input word in the sentences. For e.g: Input: "I", Output: "AM"

Follow up: Randomly pick the next word based on the probability. Probability is calculated as: Frequency of a word/Total count of words.

E.g: For the input "I", there are 2 next words in the example - "AM" and "WANT". Probability of "AM" : 2/3 and probability of "WANT": 1/3

Preparation Tips

I want to reflect on the roller coaster journey that started since I got the call in early April. With 5 years of experience in Data Science and having developed many models across different domains, this opportunity was perfect for me to take the next leap in my career. But the problem was that I had never touched DSA in my life before this. Hence began the leetcode grind which lasted almost 2.5 months. I started with the interview focused crash course on leetcode and by the time of phone screen, I had solved around 280 problems. By the time of onsites, I had done about 380 problems with a good ratio of Hard/Mediums. To my surprise, I actually got pretty good at it by the time of onsites and could easily detect patterns in most problems. Any problem above 50-55% acceptance on leetcode became quity easy to solve. For the ML part, I had pretty good understanding of classical ML algorithms. For Deep learning, I used the classic "Hands on machine learning" book which also covers tensorflow coding. For system design, I read many blogs and articles along with this course - https://bytebytego.com/courses/machine-learning-system-design-interview/visual-search-system. I also did 4 mock interviews for DSA and 1 mock for ML round.

Google - Software Engineer 2 (L3) - Interview Experience
google logo
Google
Software Engineer 2 (L3)2.5 years
July 1, 20252 reads

Summary

I had a Google interview experience for a Software Engineer 2 (L3) role, which included a phone screen, three DSA rounds, and a Googlyness round. Despite positive feedback on some rounds, my overall packet was deemed weak, and I did not proceed further.

Full Experience

Recruiter reached out to me on linkedin. I asked 3 weeks for preparation Background: YOE: 2.5 years, Currently working at a PBC

Round 1 : Phone Screen (45 min) I was asked a graph-based problem that involved identifying the number of connected components in a graph and making decisions based on that. Was asked follow-up questions about the time and space complexity of my approach.

Feedback: Positive (Received after a week)

Round 2 : DSA (45 min)

I was given a problem similar to finding the largest files in a file system that contains both files and directories. As a follow-up, I was asked to return the top-sized directories, where the size of a directory is defined as the total size of all files it contains.

Round 3 : DSA (45 min)

I couldn't recall the exact question as it was quite descriptive and required careful attention to fully understand. I managed to come up with a solution, but missed a few edge cases during implementation. Since I spent a significant amount of time understanding the problem and clarifying test cases, there wasn't enough time left for follow-up questions.

Round 4 : DSA (45 min)

The question was related to operating system scheduling algorithms, along with a follow-up based on that. I was able to successfully solve both parts.

Round 5 : Googlyness (45 min)

I was asked behavioral questions focused on topics like demonstrating customer empathy and addressing personal weaknesses etc.,

Feedbacks: (Received almost after a month) Round 2 : Positive Round 3 : Mixed - Because I missed edge cases Round 3 : Mixed - I am not sure why!! Round 4 : Mixed - I felt I was not confident enough while answering

My recruiter mentioned that, with these feedbacks my packet looks weak and will not be proceeding further.

Interview Questions (3)

Q1
Number of Connected Components in a Graph
Data Structures & Algorithms

I was asked a graph-based problem that involved identifying the number of connected components in a graph and making decisions based on that. Was asked follow-up questions about the time and space complexity of my approach.

Q2
Largest Files/Top Sized Directories in a File System
Data Structures & Algorithms

I was given a problem similar to finding the largest files in a file system that contains both files and directories. As a follow-up, I was asked to return the top-sized directories, where the size of a directory is defined as the total size of all files it contains.

Q3
Behavioral Questions: Customer Empathy and Weaknesses
Behavioral

I was asked behavioral questions focused on topics like demonstrating customer empathy and addressing personal weaknesses etc.,

Preparation Tips

I asked 3 weeks for preparation

Google Interview Experience – Graph Problem (June 2025)
google logo
Google
July 1, 20253 reads

Summary

I participated in a Google screening round in June 2025, lasting 45 minutes, where I was presented with a graph problem. My approach involved Dijkstra’s algorithm to precompute shortest paths and then binary search for queries, but I received no feedback post-interview despite follow-ups.

Full Experience

Status: Screening Round
Duration: 45 minutes (5 mins intro + 15 mins explanation + 25 mins coding)

[IMP] Final Thoughts
I gave my best during the interview. The problem was interesting and implementation-heavy under time constraints, but I felt confident in my approach and communication.

However, despite following up 3–4 times, I never received any feedback — neither a rejection nor a selection.
Honestly, this part was disappointing.
As candidates, we invest a lot of time preparing and genuinely care about the process, so some form of closure would go a long way.

Interview Questions (1)

Q1
Graph: Max Cities on Shortest Path within Time Limit
Data Structures & Algorithms

There are N cities in a town, and some of them are connected with roads. Each road takes a certain number of hours to travel. You're given the road network as a list of edges:

edges = [ [u, v, h], ... ]
Where:

  • u and v are city indices.
  • h is the time in hours to travel between u and v.

You are also given:

  • A source city s.
  • A list of queries. Each query has:
  • A destination city d
  • A time limit H (in hours)

Goal
For each query (d, H), find the maximum number of cities you can visit on the shortest path from s to d within H hours.

Example:
Let's say:

source = 2
One of the shortest paths to destination = 10 is:
2 → 4 → 9 → 12 → 15 → 18 → 10, and the shortest distance is 50 hours.
You can precompute something like:

cities_visited_by_time = [2, 4, 9, 12, 15, 18]
This means:

City 1 is reached at 2nd hour,
City 2 at 4th hour,
...
For a query with H = 14, you can do a binary search (lower/upper bound) on cities_visited_by_time to find how many cities are visited within 14 hours.

Google Interview Experience (L5) — 8+ YOE
google logo
Google
SDE III8 years
June 30, 20252 reads

Summary

I interviewed for an L5 Staff Software Engineer role at Google with over 8 years of experience. Despite passing the qualifying round and solving problems in subsequent rounds, I ultimately received a 'No Hire' for both L5 and L4 positions. The interviews covered topics from HashMap internals and expression evaluation to interval management and concurrent user counters.

Full Experience

Interview Experience – L5

YOE: 8+ years
Prep time: ~4 months
Language: Java


Qualifying Round

Question:
Implement the internal workings of a HashMap.
(The question was indirect, not "implement HashMap" literally.)

My approach:

  • Explained hashing, collision resolution (separate chaining), resizing.
  • Discussed load factor, capacity thresholds.
  • Answered all follow-ups thoroughly.

Verdict:

  • Self-assessment: ✅ Strong hire
  • Actual: ✅ Passed

Notes:
Understand not just how to implement, but why you choose a collision strategy and resizing approach.


Round 1

Question:
Given an expression, insert + and * operators to evaluate to a target.

My approach:

  • Used DFS/backtracking to explore all operator placements.
  • Built expression string carefully.
  • Explained time and space complexity.

Follow-ups:

  • Handling 0 (leading zeros).
  • Handling negative numbers.

Outcome:

  • Solved all parts in the interview.

Verdict:

  • Self-assessment: ✅ Strong hire
  • Actual: ❌ No hire

Notes:
Even if you solve the problem, interviewers will still evaluate how clearly you explain your reasoning, handle edge cases, and write clean code.


Round 2

Question:
Given employee names with entry and exit times, for specific times, find how many employees are present.

My approach:

  • Took some time clarifying the problem.
  • Used sorting and line-sweep technique.
  • Completed core logic.

Issue:

  • Ran out of time for follow-up questions.
  • Made mistakes explaining time complexity.

Verdict:

  • Self-assessment: ✅ Hire
  • Actual: ❌ No hire

Notes:
Make sure you can clearly and quickly explain your time/space analysis. Practice summarizing approaches like line-sweep and prefix sums under time pressure.


Round 3

Question:
How would you implement a counter for a given userId?
(uId, counter) map

Follow-ups:
Handling in a multi-threaded environment.

My approach:

  • Suggested using a basic map.
  • Mentioned ConcurrentHashMap.
  • Talked about AtomicInteger per user.
  • Discussed synchronized blocks.

Verdict:

  • Self-assessment: ✅ Hire
  • Actual: ❌ No hire

Notes:
Concurrency questions often require deep understanding of Java primitives. Be ready to discuss race conditions, consistency guarantees, and practical implementation details.


Final Verdict

  • L5: ❌ No hire
  • Also tried for L4: ❌ No hire

Key Takeaways

  • Master fundamentals like HashMap internals, DFS/backtracking, interval/line-sweep techniques.
  • Always explain time and space complexity clearly and confidently.
  • Be fast at clarifying problem statements to avoid losing time.
  • Practice multi-threading patterns in your chosen language, including specifics like ConcurrentHashMap and AtomicInteger.
  • Don’t just “make it work” — be able to explain why your approach is correct and optimal.

Interview Questions (4)

Q1
Implement HashMap Internals
Data Structures & Algorithms

Implement the internal workings of a HashMap. (The question was indirect, not "implement HashMap" literally.) Understand not just how to implement, but why you choose a collision strategy and resizing approach.

Q2
Insert Operators to Evaluate Expression
Data Structures & Algorithms

Given an expression, insert + and * operators to evaluate to a target. Follow-ups included handling 0 (leading zeros) and handling negative numbers.

Q3
Employee Presence Counter at Specific Times
Data Structures & Algorithms

Given employee names with entry and exit times, for specific times, find how many employees are present.

Q4
Implement User Counter with Concurrency
Data Structures & Algorithms

How would you implement a counter for a given userId? (uId, counter) map. Follow-ups included handling in a multi-threaded environment.

Preparation Tips

I prepared for approximately 4 months.

Key Takeaways

  • Master fundamentals like HashMap internals, DFS/backtracking, interval/line-sweep techniques.
  • Always explain time and space complexity clearly and confidently.
  • Be fast at clarifying problem statements to avoid losing time.
  • Practice multi-threading patterns in your chosen language, including specifics like ConcurrentHashMap and AtomicInteger.
  • Don’t just “make it work” — be able to explain why your approach is correct and optimal.
[Google Virtual Interview] Determine Precise Player Rankings - Graph Theory Problem
google logo
Google
Virtual Interview
June 26, 20253 reads

Summary

This post details a Google virtual interview question focused on determining precise player rankings in a chess tournament using graph theory, providing a comprehensive problem description, examples, constraints, and detailed algorithmic approaches.

Full Experience

Chess Tournament Ranking

Note: This problem is based on a Google interview question, with additional explanations and examples added for clarity.

Credits

  • Original Problem Source: Google Technical Interview
  • Enhanced by: Additional test cases, detailed explanations, and algorithmic analysis
  • Problem Category: Graph Theory, Topological Sorting, Transitive Closure

If you found this problem interesting, consider exploring similar graph-based ranking problems or other Google interview questions involving partial ordering and transitive relationships.

Interview Questions (1)

Q1
Determine Precise Player Rankings
Data Structures & AlgorithmsHard

Problem Description

In a chess tournament with N players, each player has a distinct rank from 1 to N (where rank 1 is the best player and rank N is the worst). In any game between two players, the higher-ranked player (lower rank number) always wins.

Given the results of M games in the format [winner, loser], determine which players' ranks can be precisely determined.

A player's rank can be precisely determined if we can establish their exact position in the ranking through the transitive relationships from all game results.

Function Signature

vector<pair<int, int>> determineRanks(vector<vector<int>>& games, int n);

Parameters:

  • games: A 2D array where games[i] = [winner, loser] represents that player winner beat player loser
  • n: The total number of players (numbered from 1 to n)

Returns:

  • A vector of pairs [player, rank] for players whose ranks can be precisely determined

Examples

Example 1:

Input: games = [[4,3],[4,2],[3,2],[1,2],[2,5]], n = 5
Output: [[2,4],[5,5]]

Explanation:
- Player 2 lost to players 1, 3, 4 and won against player 5
- Since we know 3 players beat player 2 and player 2 beats 1 player,
  player 2's rank is precisely 4 (3 + 1 = 4)
- Player 5 lost to player 2, and we know player 2 lost to 3 other players
- So player 5 is beaten by all other players, making their rank precisely 5

Example 2:

Input: games = [[1,2],[2,3],[3,4],[3,5],[4,6],[5,6]], n = 6
Output: [[1,1],[2,2],[3,3],[6,6]]

Explanation:
- Player 1: beats everyone transitively (2,3,4,5,6), beaten by none → rank 1
- Player 2: beats (3,4,5,6), beaten by (1) → rank 2
- Player 3: beats (4,5,6), beaten by (1,2) → rank 3
- Player 6: beats none, beaten by everyone (1,2,3,4,5) → rank 6
- Players 4,5: both beat only (6) and beaten by (1,2,3), so 3+1+1=5≠6
  They could be rank 4 or 5, cannot be precisely determined

Constraints

  • 1 <= n <= 1000
  • 0 <= games.length <= min(n*(n-1)/2, 2000)
  • games[i].length == 2
  • 1 <= games[i][0], games[i][1] <= n
  • games[i][0] != games[i][1]
  • No duplicate games
  • All game results are consistent with some valid ranking
Most Asked Question Google Interview and Candidates are not able to solve
google logo
Google
June 21, 20253 reads

Summary

This post describes a challenging algorithmic problem frequently asked in Google interviews, involving cost-effective operations to make integers divisible or not divisible by 3.

Full Experience

integer a,b,c,d,e given d is cost of incrementing 1 in every integer and e is cost of incrementing 1 only in any one integer u have to calculate step1 a,b,c are divisible by 3 and step 2 a,b,c are not divisible by 3 a = 1, b=2, c=3 , d=1 ,e=1 for step 1 we increment b by 1 following e cost and then increment a by 2 following 2 times e operations total cost = 3, now a,b,c are divisible by 3 for step 2 increment c by 1 following e cost, now a,b,c are not divisible by 3 answer 3,1

constraints 0<a,b,c<1000

Interview Questions (1)

Q1
Optimize Integer Divisibility by 3 with Costs
Data Structures & AlgorithmsHard

Given integers a, b, c, d, e where 'd' is the cost of incrementing 1 in every integer and 'e' is the cost of incrementing 1 only in any one integer. You need to calculate the minimum cost for two steps:

Step 1: Make a, b, c all divisible by 3. Step 2: Make a, b, c all NOT divisible by 3.

Example: a = 1, b = 2, c = 3, d = 1, e = 1

For Step 1: Increment b by 1 (cost 'e') then increment a by 2 (2 times 'e' operations). Total cost = 3. Now a, b, c are divisible by 3.

For Step 2: Increment c by 1 (cost 'e'). Now a, b, c are not divisible by 3.

Expected answer: 3, 1

Constraints: 0 < a, b, c < 1000

Google Warsaw | SRE-2 | Offer
google logo
Google
SRE-2WarsawOffer
June 16, 202548 reads

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)

Q1
Describe Pivoting Midway
Behavioral

Describe a situation where I had to change direction or strategy midway through a project or task at my workplace.

Q2
Positive Impact on Team
Behavioral

Share an experience where my actions or behavior positively influenced my team.

Q3
Filesystem Size Calculation with Caching & Cycles
Data Structures & AlgorithmsHard

Given a filesystem, calculate sizes, considering potential cycles. Implement caching for multiple queries, optimizing space by only storing folder sizes (assuming file sizes are O(1) lookup). Handle multiple filesystems and consider alternative approaches like Union-Find for complex scenarios.

Q4
Validate String with Length, Consecutive Char, and Alphabet Constraints
Data Structures & AlgorithmsMedium

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.

Q5
Count Valid Strings with Length, Consecutive Char, and Alphabet Constraints
Data Structures & AlgorithmsHard

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.

Google Phone Screening L4
google logo
Google
SDE II
June 16, 20254 reads

Summary

I experienced a Google Phone Screening for an L4 role where I was asked to implement an iterator for decoding a string based on a given tree structure.

Full Experience

given a string and a tree to decode the string
Example -
s = "ABGHBCDDE"
()-> A -> B -> G -> H "Hello"
-> B -> C -> D " "
-> D -> E "there"

Write a class implementing below interface

public interface Iterator<Character> {
Character next();
boolean hasNext();
}

Here next() returns the next character of decoded String.
hasNext() returns true if there are more characters in the decoded string.

Interview Questions (1)

Q1
Tree String Decoder Iterator
Data Structures & Algorithms

Given a string and a tree to decode the string.
Example -
s = "ABGHBCDDE"
()-> A -> B -> G -> H "Hello"
-> B -> C -> D " "
-> D -> E "there"

Write a class implementing below interface

public interface Iterator<Character> {
Character next();
boolean hasNext();
}

Here next() returns the next character of decoded String.
hasNext() returns true if there are more characters in the decoded string.

Google L3 (SDE-II) Interview Experience (5 rounds) - India 2025 April - May
google logo
Google
L3 (SDE-II)India2 years
June 16, 20253 reads

Summary

I interviewed for a Google L3 (SDE-II) role in India, completing 5 rounds including technical and a G&L round which turned into a technical one. Despite strong performance in most rounds, I was ultimately rejected due to negative feedback on the last two interviews.

Full Experience

Background

  • Experience: 2 years in Full-Stack Development
  • Competitive Programming: Master on Codeforces
  • Application: Applied via the Google Careers portal (no referral)

Recruiter Call

I received a call in the first week of April. The recruiter inquired about my background, experience, and salary expectations. I was asked to share five available dates for interviews, with a maximum of two weeks' preparation time. However, the actual interviews were scheduled for later dates than initially discussed. Each round was set for 45 minutes.

Elimination Round (45 mins)

Timezone: US
Problem: A MEX-like problem involving sequence numbers (long long int) and an initial sequence number x. Two types of queries were involved:

  1. Add a sequence number y
  2. Fetch the minimum missing sequence number from the current set

Solution:
I used a HashSet to store the incoming sequence numbers and a variable to track the current missing sequence. With each insertion, the tracker increments until it hits the next missing value. For query type 2, we return this number. I also discussed time complexity in detail.

Follow-up Questions:

  • Why not trigger the increment in the "get minimum" call?
    I explained that placing the increment depends on the query pattern. If query type-2 is less frequent, it’s more efficient to place it during the insertion step.
  • Real-world application and the role of the initial sequence number?
    I related it to a video loading use case, where the initial sequence number represents the starting frame. Missing frames indicate a need for retransmission.
  • How to detect unprocessed (corrupted) frames?
    By inserting each received frame into a HashSet and removing it upon processing.
  • How to distinguish between corrupted and unprocessed frames?
    Through timestamp-based invalidation.

Timeline:

  • Question & clarification: 5–10 mins
  • Approach: 8 mins
  • Implementation: 8 mins
  • Follow-up: 10 mins
  • Interviewer questions: 5 mins
  • Ended early

Result: Advanced to next rounds — 3 Technical + 1 Googleyness & Leadership (G&L)

Technical Interview 1 (45 mins)

Timezone: India
Problem: An array (garland) contains d diamonds and r rubies (both even). You are allowed up to 2 cuts to divide it into two parts such that both parts contain the same number of diamonds and rubies.

Approach:

  • For 1 cut: Only the middle position works.
  • For 2 cuts: First and last segments form one group; use a sliding window of fixed length n/2. Achieved an O(n) time solution using O(1) space.

Follow-up:

  • What if there's a third type of stone and up to 3 cuts allowed?
    I used the same logic for up to 2 cuts. For 3 cuts, fixed the first segment and iterated possible joins for a rough O(n²) solution. Did not implement.

Timeline:

  • Question & clarification: 5–10 mins
  • Approach: 5–10 mins
  • Implementation: 20–25 mins
  • Follow-up: 2–3 mins
  • Interviewer questions: 2 mins

Technical Interview 2 (50–55 mins)

Timezone: India
Problem: In an undirected graph where nodes represent homes, two persons (nodes a and b) must reach a destination node c. They may travel independently or meet up on the way and then travel together. Joint travel on an edge counts as a single unit of cost.

Approach:
Precomputed all shortest paths between node pairs. For each node, considered it as a meeting point for a and b, then both travel together to c. Computed the minimum total cost.

Time Complexity: O(n²)

Follow-up:

  • Now suppose there are 3 friends: a, b, and d—how would all of them reach c?
    I considered 3 possible groupings: (a & b), (b & d), (d & a), with each pair meeting before the third joins. For each, iterated over potential join points to compute the best path. Did not implement.

Timeline:

  • Question & clarification: 5–10 mins
  • Approach explanation: 15–20 mins
  • Implementation: 15–20 mins
  • Follow-up: 5 mins
  • Interviewer questions: 5 mins

Technical Interview 3 (45 mins)

Timezone: Australia

Problem 1: Remove a node with a given value from a linked list
Response: Implemented quickly

Problem 2: Create an n × m maze such that there is exactly one valid path between every two cells.
Initial Idea:
Start from cell (1,1), go straight if possible, else turn left—creates a spiral path. Explained this for ~10 mins before self-correcting.

Final Idea:
A simpler method—draw all horizontal lines, but skip one column per row to maintain a unique path between all cells.

Timeline:

  • Problem 1: 20 mins
  • Problem 2: Question & clarification (5 mins), Idea 1 (10–15 mins), Idea 2 (2 mins)
  • Interviewer questions: 5 mins

Technical Interview 4 (45 mins)

Timezone: US
Note: This was supposed to be a G&L round, but the interviewer decided to conduct a technical interview.

Problem: Inside an n × m rectangle with a set of horizontal and vertical lines, find how many squares can be formed.

Approach:
Used preprocessing to store the maximum length of consecutive horizontal/vertical lines ending at each point. For each potential square, checked if it could be formed using these precomputed values.

Timeline:

  • Interviewer joined late (~5–10 mins delay); I created and shared a Google Doc
  • Question & clarification: 5–10 mins
  • Solution explanation + pseudocode: 25–30 mins
  • Interviewer questions: 5 mins

Final Result

Rejected. The recruiter shared that the last two rounds received negative feedback. Surprisingly, during the final interview, the interviewer actively followed my approach, asked relevant questions, and signaled understanding throughout the session. The rejection note cited that the interviewer was “not able to understand the solution,” which was inconsistent with the actual interaction.

Interview Questions (6)

Q1
MEX-like problem with sequence numbers and queries
Data Structures & Algorithms

A MEX-like problem involving sequence numbers (long long int) and an initial sequence number x. Two types of queries were involved: 1. Add a sequence number y, 2. Fetch the minimum missing sequence number from the current set.

Q2
Divide Garland into Two Equal Parts
Data Structures & Algorithms

An array (garland) contains d diamonds and r rubies (both even). You are allowed up to 2 cuts to divide it into two parts such that both parts contain the same number of diamonds and rubies.

Q3
Shortest Path for Two People Meeting in a Graph
Data Structures & Algorithms

In an undirected graph where nodes represent homes, two persons (nodes a and b) must reach a destination node c. They may travel independently or meet up on the way and then travel together. Joint travel on an edge counts as a single unit of cost.

Q4
Remove Node from Linked List
Data Structures & AlgorithmsEasy

Remove a node with a given value from a linked list.

Q5
Create n x m Maze with Unique Path
Data Structures & Algorithms

Create an n × m maze such that there is exactly one valid path between every two cells.

Q6
Count Squares in a Grid with Lines
Data Structures & Algorithms

Inside an n × m rectangle with a set of horizontal and vertical lines, find how many squares can be formed.

Google L3-L4 Question Compilation from Discussion
google logo
Google
June 14, 20257 reads

Summary

This post compiles a list of coding and system design questions reportedly asked at Google for L3 and L4 level positions, gathered from various discussions.

Full Experience

This post provides a compilation of technical interview questions for Google L3 and L4 roles, gathered from various discussions, rather than a single candidate's personal interview experience.

Interview Questions (33)

Q1
Find Buddy Words
Data Structures & Algorithms

Find all possible buddy words from the given list of strings (lower alpha). E.g., for 'abc' a buddy could be 'cde', for 'gyr' a buddy could be 'hzs'.

Q2
Swim in Rising Water
Data Structures & AlgorithmsHard

Similar to LeetCode problem: Swim in Rising Water.

Q3
Determine Player Ranks in Chess Contest
Data Structures & Algorithms

There is a chess contest between N players. Each chess player has a distinct rank (positive integer number from 1 to N). We assume that in a chess game between two players, the player ranked higher always wins. The ranks remain constant during the contest. Unfortunately, we don't know the player ranks. But we know the outcome of M games in the following format: Player #1 won #2, Player #2 won #4, ... Given the results of M games above, are there any players whose rank can be precisely determined?

Q4
Social Network Profile View Count
Data Structures & Algorithms

Consider a social network with n users. You have been given vector<vector<int>> friends, where friends[i][0] and friends[i][1] are friends. A person 'a' can view profile of 'b' if they are friends or have an indirect common friend. Find out how many profiles each user can view. Constraint: n <= 10^5, friends.size() <= n. E.g.: n = 7, friends = [{1,2}, {2,3}, {3,4}, {5,6}, {6,7}], result = [4,4,4,4,3,3].

Q5
Unique Palindromic Substrings
Data Structures & Algorithms

Given a string 's', find the number of unique palindromic substrings. Constraints: s.size() <= 5000. E.g.: s = "aacaa", result = 5 ["a", "c", "aa", "aca", "aacaa"].

Q6
Shortest Time to Any Favorite City
Data Structures & Algorithms

You are given multiple cities and a city A, each city is at a distance represented by time it takes to reach it. You are given n favorite cities. Find the shortest time to reach any of the favorite cities and return the time required.

Q7
Max Same-Value Subtree Size
Data Structures & Algorithms

Given a binary tree, return the maximum binary subtree size where all values of nodes are equal. Example: 2 2 2 2 2 2 3 Ans: 3.

Q8
String Expression Evaluation
Data Structures & Algorithms

String expression evaluation. Ex: 2a+2b-(a-b). Ans: a+3b.

Q9
Package Stream Items into Triplet Boxes
Data Structures & Algorithms

Imagine you are standing at an incoming conveyor belt of items that need to be packaged into boxes of exactly three items that all fit together and placed on a second, outgoing, conveyor belt. You have sufficient storage space to place items off to the side while you wait for a full triplet that all fit together. Conveyor belt items are floating point numbers. Three items that "fit together" means that all items are within distance 'd' of each other. Once a 3-tuple is formed, those items must be discarded (should not be considered for future tuples). Input example: input_stream = [1.0, 11.0, 12.0, 13.0, 2.0, 3.0], d = 3. Output: [[11.0, 12.0, 13.0], [1.0, 2.0, 3.0]]. Distance is calculated by absolute values of the items (e.g., |1.0-2.0| = 1 <= 3, |2.0 - 3.0| = 1 <= 3, |1.0-3.0| = 2 <= 3). Input will not be given as an array but instead is a stream of numbers. Follow Up: If instead of just floating point numbers, you were given points on an X-Y plane, how would you modify the solution?

Q10
BST Inorder Successor and Predecessor with Parent Pointer
Data Structures & Algorithms

Given a node in a Binary Search Tree (BST), find the next largest (inorder successor) and next smallest (inorder predecessor) node. It is guaranteed that these nodes always exist (i.e. the input node will never be the smallest or largest node in the BST). You are only given a pointer to the node, and each node has a parent pointer. The structure is as follows: struct Node { int value; Node* left_child; Node* right_child; Node* parent; }; Consider this BST: 4 /
2 6 / \ /
1 3 5 7 If the given node is 3, the next largest (successor) is 4, the next smallest (predecessor) is 2.

Q11
Reach Destination in Graph Avoiding Corrupted Node (and Min Distances)
Data Structures & Algorithms

Given a source, destination, and a corrupted node in a graph, find if it is possible to reach the destination from the source without traversing the corrupted node (BFS/DFS). Follow Up: Return the minimum distance of every node from the source node, assuming all edge weights are 1.

Q12
Buddy Strings (with custom distance)
Data Structures & Algorithms

Given 2 strings, return if they are buddies. Two strings are buddies if the distance between each character of the strings is the same. dist('a', 'b') = 1 and dist('b', 'a') = 25. Also, dist('z', 'a') = 1. Follow Up: Given a list of strings, group all buddies together.

Q13
Transform Array to Permutation with Directional Adjustments
Data Structures & Algorithms

You are given a list of N elements. Each element is a tuple (value, can_decrement) where value is an integer (positive or negative), can_decrement is a boolean indicating how the value can be adjusted: If True, you are only allowed to decrement the value. If False, you are only allowed to increment the value. You are allowed to increment/decrement each number as much as you want, but only in the allowed direction. Your task is to determine whether it's possible to transform all values into a valid permutation of [1, 2, ..., N]. If it's possible, return the mapping in the form {original: transformed}. If it's not possible, return an empty dictionary. Follow Up: How many elements can be moved from the decrement list to the increment list and still allow a permutation to be made?

Q14
Move Pieces to Obtain a String
Data Structures & AlgorithmsMedium

LeetCode problem: Move Pieces to Obtain a String.

Q15
Largest K-Digit Subsequence Number
Data Structures & Algorithms

You have a very large number, e.g., 2123470299109372, and a given integer k (e.g., k=6). You need to find the largest k-digit number which is a subsequence of the original number. Example: ans=999372.

Q16
Max Gifts Purchase with Daily Savings
Data Structures & Algorithms

An uncle wants to buy gifts for his nephew. The nephew provides a list of gifts, where each gift has: day (the day the gift is available for purchase) and price (the cost of the gift on that day). Example: (3, 4), (4, 2), (6, 4), (10, 5). The uncle saves $1 per day and can only buy a gift on the specified day. If he skips a gift, he cannot buy it later. The goal is to determine the maximum number of gifts he can purchase.

Q17
Building Peak Occupancy
Data Structures & Algorithms

Given security logs with timestamps for entry and exit of users, determine: the maximum occupancy of the building at any given time, and the time at which that peak occupancy occurred.

Q18
Generate Nth License Plate Number
Data Structures & Algorithms

Given an integer n, return a license plate number following this pattern: Ranges: 00000-99999, A0000-Z9999, AA000-ZZ999, AAA00-ZZZ99, AAAA0-ZZZZ9, AAAAA-ZZZZZ. Helper Functions Provided: padToBeginning(reqLen, charToPad, value): Pads the given character at the beginning of a string to achieve the required length. Example: padToBeginning(9, '0', '123') = 000000123. alpha(value): Converts an integer into an alphabetic sequence. Example: alpha(0) = A, alpha(25) = Z, alpha(26) = AA.

Q19
Optimize JSON Document Diff/Save
System Design

You are designing a JSON webpage viewer with the ability for users to save and load previously viewed JSON documents. The website sends/receives the complete state of the world from the webpage to the backend server on each update/save. The state of the world is stored in SimpleJSON. The client has the original document D1 and the modified document D2, where D2 is D1 + (delta). You begin profiling the application and notice that for very large JSON documents being saved it's very slow -- even if no change has been produced! Optimise the space-efficiency of saving the changes for a given SimpleJSON document where you are given 'old_doc' and 'new_doc'. Follow up: Json can be nested json.

Q20
Linked List with Hash Validation and Recursive Insertion
Data Structures & Algorithms

A linked list problem where each node contains a value, a next pointer, and a hash computed using the current node’s value and its next node. Tasks included: Insert a node at the head of the list; Validate the linked list by traversing and verifying the hash of each node; Inserting a node at position k using recursion (which requires updating the hash values of all nodes from position k up to the head).

Q21
Merge Overlapping Intervals with Names
Data Structures & Algorithms

For given intervals inputs [from, to, name], return non-overlapping intervals [from, to, name(s)]. Example: Input [10, 100, David], [50, 150, Alex], [200, 300, Joe]. Output [10,50, David], [50, 100, (David, Alex)], [100, 150, Alex], [200, 300, Joe].

Q22
Design Search Autocomplete System
System DesignHard

LeetCode problem: Design Search Autocomplete System.

Q23
Movie Recommendation System with Transitive Similarity
System Design

Design a movie recommendation system. Each movie has a title and a rating. If movie A is similar to movie B, and movie B is similar to movie C, we will also consider movie A as similar to movie C (transitive property). Given a movie from the list, return its N similar movies with the highest rating. For example, if we have the following four movies: "Movie A" with rating 6, "Movie B" with rating 7, "Movie C" with rating 8, "Movie D" with rating 9, and the process has determined the following similarities: "Movie A" is similar to "Movie B", "Movie B" is similar to "Movie C".

Q24
Most Beautiful Item for Each Query (Find Ranges for Number)
Data Structures & AlgorithmsMedium

Given a list of ranges, find the indices of ranges that contain a given number. LeetCode problem: Most Beautiful Item for Each Query. Example: ranges = { (3, 9) , (2, 8) , (5, 10) }. f(3) should return {0, 1}. f(9) should return {0, 2}.

Q25
Merge Ordered Sequences (preserving order)
Data Structures & Algorithms

You have an array of sequences, where each sequence has some values in order. You have to create a single result sequence where the relative order of elements within each original sequence stays as it is. Example: [[1,2,15,8], [2,4,7,8], [2,3,7,15]]. Output: 1,2,3,4,7,15,8 or 1,2,4,3,7,15,8. False case: [[1,6,4], [4,1]].

Q26
Max Ones in 3x3 Submatrix
Data Structures & Algorithms

Given a matrix of size n * m (where n >=3 and m >= 3), find the number of 3 * 3 submatrices that have the maximum number of ones.

Q27
Aggregate Points for Leaf Nodes in Hierarchical Strings
Data Structures & Algorithms

Strings are associated with points, like: [ ["cat.animal", 5], ["animal", 10], ["lion.animal", 15], ["tiger.cat.animal", 20] ]. Each string contributes its points to itself and any of its parent nodes (e.g., 'cat.animal' is a parent of 'tiger.cat.animal', 'animal' is a parent of 'cat.animal'). The goal is to return only the leaf strings (i.e., strings that don't have any children) along with their total aggregated points. Expected output: [ ["lion.animal", 25], # 15 (self) + 10 (animal) ["tiger.cat.animal", 35] # 20 (self) + 10 (animal) + cat.animal(5) ]. Only two leaf nodes exist in this case: 'lion.animal' and 'tiger.cat.animal'.

Q28
Max Continuous Window of Zeros with K Flips
Data Structures & Algorithms

Given an array like arr = [1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1]. Goal: Find the maximum continuous window where all elements are 0. Follow-up: Given that we can flip at most K 1s to 0s, find the longest window that becomes all zeros after flipping.

Q29
Max Profit from City Switching with Costs
Data Structures & Algorithms

Given two cities A and B, where you need to collect profit. The cost of switching between the cities is given as negative, e.g., -5. Find the maximum profit you can collect, given you can start from any city and switch as many times as you want. Example: A = [2, 3, 4, 5, 6], B = [4, 3, 6, 5, 8], switch Cost = -5.

Q30
String Replacement Library with Cyclic Dependency Detection
Data Structures & Algorithms

The question was to create a string replacement library. Given a map of string replacements, replace the value in the input string. Example: Map: {USER => admin, HOME => /%USER%/home}. Input: I am %USER% My home is %HOME%. Output: I am admin My home is /admin/home. Follow-up: He later modified the question to include something like a loop. We need to figure out how to detect and handle that. Example: Map: {USER => admin, HOME =>/%USER%/%PATH%/, PATH => %HOME%}.

Q31
Maximum Matching Prefix Between Files
Data Structures & Algorithms

Given multiple files (represented as arrays of strings/words), find the maximum length of a common prefix between any two files. Sample input: String[] file1 = {"hello", "world", "abc", "xyz"}; String[] file2 = {"hello", "world", "abc", "xyz1"}; String[] file3 = {"hello", "world", "abc2", "xyz"}; String[] file4 = {"hello", "world", "abc1", "xyz2"}. Answer for this is 3 ("hello", "world", "abc") which matches in file1 and file2.

Q32
Top N Most Talkative Users in Chat Log
Data Structures & Algorithms

Problem: Given a chat log file, find the top N most talkative users along with their total word count. Example Log: 10:00 < John > Hi, How is everyone?, 10:05 < Amy > Hello John, 10:06 < Maria > Great, Having my morning coffee, 13:00 < John > Let's meet this weekend, 13:30 < Amy > Woahoo. Helper Function Provided: parseLog(filepath): Returns the word count of each message. Example Output: [{'John', 4}, {'Amy', 2}, {'Maria', 5}, {'John', 4}, {'Amy', 1}]. Follow-up Questions: Optimize for better complexity. Implement the parseLog() function.

Q33
Optimal Cafe Location for Friends (Minimax Distance)
Data Structures & Algorithms

Given an unweighted and undirected graph, there are some friends on some nodes and some cafes on other nodes. We want to find a cafe such that the maximum distance travelled by any of the friends to reach that cafe is minimal (minimax problem). Sample input: Friends - 1,7. Cafes - 5,6. Edges - 1 2, 2 3, 3 4, 4 5, 3 6, 7 5, 7 3. Example distances: Friend 1 to cafe 5 is 4, to cafe 6 is 3. Friend 7 to cafe 5 is 3, to cafe 6 is 2. Cafe 6 is the answer since max distance travelled by both friends (max(3,2)=3) is less compared to cafe 5 (max(4,3)=4). If its impossible to reach a cafe then return null. There could be cycles in graph.

Google | L4 | India | Onsite | Googleyness | Round
google logo
Google
SDE IIIndia
June 13, 20254 reads

Summary

I experienced an L4 Googleyness round at Google India, which involved 6-7 behavioral questions focused on past experiences. The interview was completed within 30 minutes, and I extended it with questions about culture.

Full Experience

Interviewer told we will be having 6-7 questions, will try to cover up the entire thing in 30 minutes. After that I can ask questions if any.

Also he told that all questions will be based on your past experiences and if you have not had any similar experience as per the respective question, you can skip that one.

Questions

  1. Describe a time when you had a disagreement with your colleage and how you resolved it?
  2. Describe a time where a strict deadline project was pushed away from you in the middle. How did you feel about it?
  3. Describe a time where you worked with other teams and had to make an influence on them
  4. Describe a time when your teammates were not stisfied with your work. How did you work around it?
  5. Describe a time when you were not able to complete the project on deadline. What approach you took?

Not able to remember but there was 1-2 more questions similar to above.

Interviewer completed within 30 minutes and I asked some questions regarding culture at Google to stretch the interview a little and closed the call in 40 minutes total

Interview Questions (5)

Q1
Disagreement with Colleague
Behavioral

Describe a time when you had a disagreement with your colleage and how you resolved it?

Q2
Project Deadline Shift
Behavioral

Describe a time where a strict deadline project was pushed away from you in the middle. How did you feel about it?

Q3
Influencing Other Teams
Behavioral

Describe a time where you worked with other teams and had to make an influence on them

Q4
Teammate Dissatisfaction with Work
Behavioral

Describe a time when your teammates were not stisfied with your work. How did you work around it?

Q5
Missing Project Deadline
Behavioral

Describe a time when you were not able to complete the project on deadline. What approach you took?

Preparation Tips

I followed below post to prepare and I guess questions came around the similar area. https://leetcode.com/discuss/post/5963463/googlyness-frequently-asked-questions-by-55sh/

Google SSE Interview
google logo
Google
SDE II
June 12, 20253 reads

Summary

I interviewed for a Staff Software Engineer role at Google, facing three technical rounds covering system design, concurrency, and tree traversal with string search. Unfortunately, I was rejected, particularly struggling with the first round's concurrency implementation.

Full Experience

Round 1 you are given a few api

API that is responsible to calculate a callback function after relative_time_stamp_in_mills from the time of the call setCallBackHandler. void setCallBackHandler(int relative_time_stamp_in_mills);

API that gives current system time in mills. int getSysTime();

You have to write a method called ScheduleCallback(call_back_func_pointer, time_in_mills) that does the job of scheduling a call to call_back_func_pointer after time_in_mills from the call.

  1. The calls might come in parallel.
  2. setCallBackHandler can only save ONE TRIGGER AT A TIME. So if the new request is supposed to get executed first, you need to handle that gracefully.
  3. setCallBackHandler takes in relative time.

Round 2 You are given a Class with two methods

Class CWFuture{
	CWFuture(Const int machine_id, const int doc_id);
	int join() // Returns the number of words in the document file. This is a blocking call, it won't return if the process is still calculating the words in the document
	int isDone() // Returns true if the calculation is done else false
}

Given max_doc_ids, you need to write a method, use CWFuture class and calculate the total number of words in doc ids ranging from [0, max_doc_ids) and return that number.

Scenario 1: You have unlimited number of machines available. Follow up scenario 2: What if you have at max N number of machines with you. Scen 3: Discussion: How would you improve the accuracy of your result if the API is not accurate every time. Let's say 90% of the time it returns correct response.

Write C++ code for both scenarios separately and implement a method called CountWords.

Round 3: You are given a data structure of HTML Content and tags. Looks like this. A node can be an html tag OR a string text.

class Node{
	bool isText();
	string getText();
	vector<Node*> getChildren();
}

You need to implement a method that takes in Head of the node and a string to search. And you should return the nodes that cover the search string within the structure.

<span><b>This</b> is a <i>funny Text.</i> </span>

         <span> 1
         /  |   \
        /   |    \
       /    |     \
     2<b> 4" is a"  <i>5
     /\t\t\t\t \
    /\t\t\t\t  \
   /\t\t\t\t   \
3"This"\t\t\t\t" funny Text."6

Case 1: Search = "is a" Returns Node 4

Case 2: Search "a fun" Returns Node 4 and Node 6.

vector<Node*> GetNodes(Node* head, string& search);

Implement GetNodes.

Overall it was a reject. You'll find the answers on Chat GPT. Apparently interviewer for the first round was expecting me to use threads and mutexes and actually implement it. That's where I lost.

Interview Questions (3)

Q1
Callback Scheduler with Concurrent Calls
System Design

API that is responsible to calculate a callback function after relative_time_stamp_in_mills from the time of the call setCallBackHandler. void setCallBackHandler(int relative_time_stamp_in_mills);

API that gives current system time in mills. int getSysTime();

You have to write a method called ScheduleCallback(call_back_func_pointer, time_in_mills) that does the job of scheduling a call to call_back_func_pointer after time_in_mills from the call.

  1. The calls might come in parallel.
  2. setCallBackHandler can only save ONE TRIGGER AT A TIME. So if the new request is supposed to get executed first, you need to handle that gracefully.
  3. setCallBackHandler takes in relative time.
Q2
Count Words using CWFuture Class with Concurrency
Data Structures & Algorithms

You are given a Class with two methods

Class CWFuture{
	CWFuture(Const int machine_id, const int doc_id);
	int join() // Returns the number of words in the document file. This is a blocking call, it won't return if the process is still calculating the words in the document
	int isDone() // Returns true if the calculation is done else false
}

Given max_doc_ids, you need to write a method, use CWFuture class and calculate the total number of words in doc ids ranging from [0, max_doc_ids) and return that number.

Scenario 1: You have unlimited number of machines available. Follow up scenario 2: What if you have at max N number of machines with you. Scen 3: Discussion: How would you improve the accuracy of your result if the API is not accurate every time. Let's say 90% of the time it returns correct response.

Write C++ code for both scenarios separately and implement a method called CountWords.

Q3
Search String in HTML Content Tree
Data Structures & Algorithms

You are given a data structure of HTML Content and tags. Looks like this. A node can be an html tag OR a string text.

class Node{
	bool isText();
	string getText();
	vector<Node*> getChildren();
}

You need to implement a method that takes in Head of the node and a string to search. And you should return the nodes that cover the search string within the structure.

<span><b>This</b> is a <i>funny Text.</i> </span>

         <span> 1
         /  |   \
        /   |    \
       /    |     \
     2<b> 4" is a"  <i>5
     /\t\t\t\t \
    /\t\t\t\t  \
   /\t\t\t\t   \
3"This"\t\t\t\t" funny Text."6

Case 1: Search = "is a" Returns Node 4

Case 2: Search "a fun" Returns Node 4 and Node 6.

vector<Node*> GetNodes(Node* head, string& search);

Implement GetNodes.

Google Phone Screening for L4
google logo
Google
SDE II
June 12, 20256 reads

Summary

I had a phone screening interview with Google for an L4 position. The round included a code output analysis question and a DSA question involving forming a target word from dictionary prefixes and suffixes. I was selected for onsite interviews.

Full Experience

1st Round - Phone Screening

After initial introductions
The interviewer gave me a piece of code and told me to write the expected output from that code.
It was a simple code comparing characters from two strings and if the characters were not matching , it was returning the index.
He then asked me to name the function which I did.

This was followed with a DSA question
Given a dictionary of words and a target word , return true if the target word can be formed from prefix and suffix of words in dictionary.
eg : dictionary : {"frog", "hat"}
targetWord -> frot, return true since fro from word 1(which is prefix) and t from word 2(which is suffix) satisfy the cndition.

I told the brute force approach in which we can check every string and if some prefix matches , we then go on to match suffix
He asked me the TC and SC of this solution and after that asked , what other approaches I can think of.

I suggested a 2nd Approach with Trie DS, we could store every word of dictionary in Trie and can then check for the targetWord.
We would need to create 2 trie's , 1st prefixTree and 2nd as suffixTree.
He asked me the TC and SC of this approach and asked when would you go for the first approach and when for 2nd.
My answer was for this particular question we can go ahead with the 1st approach but if we have stream of target words we can then move ahead with the Trie approach since it would only take O(targetWordLength) to match that word in Trie.
He was satisfied with the answer and told me to code the 1st approach.
I did code it but I think it had some bugs which he pointed out in the feedback but overall the round was positive and I was seleced for onsite interviews.

Interview Questions (2)

Q1
Code Output Analysis for String Comparison
Other

The interviewer provided a piece of code that compared characters from two strings. If characters did not match, it returned the index. I was asked to determine the expected output and name the function.

Q2
Form Target Word from Dictionary Prefixes and Suffixes
Data Structures & AlgorithmsMedium

Given a dictionary of words and a target word, return true if the target word can be formed from a prefix of one word and a suffix of another word (possibly the same word) in the dictionary.
Example: dictionary: {"frog", "hat"}
targetWord: "frot" -> true (fro from 'frog', t from 'hat').

Google | L4 | India | Onsite | DSA | Round 3
google logo
Google
SDE IIIndia
June 11, 20253 reads

Summary

I interviewed for an L4 position at Google in India. The interview focused on a single Data Structures & Algorithms problem involving counting "buddy pairs" of strings, which required understanding circular character differences and efficient data structures. I discussed brute force, Trie, and an optimized hashmap/shifted string approach, which I then coded.

Full Experience

Interviewer told there will be only 1 question no follow ups, need to write complete code with complexity analysis

Problem Statement
Given list of words, count the number of buddy pairs (need only count not the string itself)
A pair of strings is a buddy pair if all characters of string a and b follow the same gap

e.g. "abc" is buddy pair for "def"

Asked a lot of clarifying questions and finalised below

  1. For two strings to be pair, their lengths should be same
  2. Assume only lowercase characters in strings
  3. Empty strings are not present
  4. We need to find circular difference i.e. dist(a,b)!=dist(b,a)
    dist(b,e) = 3
    dist(e,b) = 23 (get distance from e to z and then to b)
  5. Initially, list of strings wont have duplicate strings
  6. String is not a buddy pair with itself

Solution
Discussed brute force approach to check every pair is buddy or not
TC - O(n^2L)

Told myself that we can optimise it and started thinking about the optimisation

Discussed trie solution that we can create insert all words in a trie
Then iterate the input list again and try to find its buddy pairs and keep on incrementing count
but string will
TC - O(nL)

Optimised Approach 1
Interviewer said this approach is interesting and asked me if I can write the code in 10-15 mins
I said yes and was about to start the code.
He interrupted me and asked me if I would like to take 2 mins and think of another approach

I said yes and started thinking

Optimised Approach 2
Came up with another approach that for every string transform it into shifted string and put in set and return set count in the end
Then I told set won't work here will need to use hashmap and for every matched word just append count with its frequency in map
TC - O(nL)
SC - O(nL)

Interviewer said this is fine and asked to code

Quickly coded it down
Struggled while writing the transform function and the interviewer helped a bit there to find the difference and get the correct new char

Interviewer asked now what if duplicates are present in the input
I told we can use set of string for every string and match it
He said it wont work and then I told we can pre filter the string to remove duplicates and then use above method again
He said it is fine, did not ask me to write the code

Then he came to my hashmap, it was
Map<String, Integer> buddyMap = new HashMap<>();
He told what will be space, I said O(nL)
He asked can we use integer as key
I said yes, create hash of every string and use that as key
He asked how to generate hash of string
Told him to use a prime number(7) and a module(101)
I told space will reduce to O(n) then
He asked what if hash collisions occur
I told we can shift prime number used in such case but it will not work for correct matches
He then told we can use generate two hashes for every string and match only if both hash matches
This will drop down hash probability to a*b

Interview Questions (1)

Q1
Count Buddy Pairs
Data Structures & AlgorithmsMedium

Given list of words, count the number of buddy pairs (need only count not the string itself)
A pair of strings is a buddy pair if all characters of string a and b follow the same gap

e.g. "abc" is buddy pair for "def"

Asked a lot of clarifying questions and finalised below

  1. For two strings to be pair, their lengths should be same
  2. Assume only lowercase characters in strings
  3. Empty strings are not present
  4. We need to find circular difference i.e. dist(a,b)!=dist(b,a)
    dist(b,e) = 3
    dist(e,b) = 23 (get distance from e to z and then to b)
  5. Initially, list of strings wont have duplicate strings
  6. String is not a buddy pair with itself
Google Software Engineer III Interview Experience : REJECT
google logo
Google
Software Engineer III
June 10, 20254 reads

Summary

I interviewed for a Software Engineer III role at Google, undergoing a phone screen and four onsite rounds covering data structures, algorithms, and behavioral questions. Despite identifying key approaches for some problems, I struggled with optimization and converting insights into efficient solutions, ultimately leading to a rejection with feedback on problem-solving and time efficiency.

Full Experience

I applied for a role via the Google Careers site. After approximately 2–3 weeks, I was contacted by a Google recruiter via email. I requested 3 weeks of preparation time before the interview process began. However, due to a transition where my assigned recruiter resigned and a new one took over, the interview was delayed. I subsequently requested an additional 2 weeks to prepare for the phone screen.

Phone Screen Interview

The problem involved reading strings from two files and finding the count of matching elements. After implementing the initial solution, the interviewer extended the problem to handle n files and asked for the maximum number of common elements found in at least two files.

The interview went well, and the recruiter later informed me that the interviewer gave a green flag to proceed to the onsite interviews.

A new recruiter was assigned for coordinating the onsite rounds, and I requested around 3 weeks of preparation time.

Onsite Interview

Round 1

The task involved identifying duplicates within a 10-second window. I implemented a solution using a hashmap and discussed time and space complexity. The follow-up asked for optimizing space complexity, but I couldn't effectively articulate the improved approach — although I was aware it involved using a deque, similar to the Sliding Window Maximum pattern.

Self-Evaluation: Lean Hire / No Hire

Round 2

This problem involved finding the farthest nodes from multiple source nodes using a breadth-first search. I implemented a BFS-based solution, and the follow-up questions were already addressed within my initial approach. I also discussed the time and space complexity in detail.

Self-Evaluation: Hire / Strong Hire

Round 3

This round focused on common behavioral questions such as:

“What was your toughest challenge, and how did you overcome it?”

“Describe a situation where you had to work with a difficult teammate.”

“How did you handle a project that changed direction mid-way?”

Self-Evaluation: Hire

Round 4

The question involved using prefix sums and hashmaps to track specific indices. Although I initially identified the need for prefix sums within the first 10 minutes, I was unable to translate that insight into an efficient solution. I ended up proposing an O(N^3) brute-force approach and struggled to progress further.

Self Evaluation : No Hire

Final Feedback

I received a call from the recruiter with the outcome. They summarized the feedback by stating I should focus on improving problem-solving and time efficiency a bit more.

Interview Questions (6)

Q1
Count Matching Elements in Files (N Files Extension)
Data Structures & Algorithms

The problem involved reading strings from two files and finding the count of matching elements. After implementing the initial solution, the interviewer extended the problem to handle n files and asked for the maximum number of common elements found in at least two files.

Q2
Identify Duplicates in a Time Window
Data Structures & Algorithms

The task involved identifying duplicates within a 10-second window. The follow-up asked for optimizing space complexity, similar to the Sliding Window Maximum pattern.

Q3
Farthest Nodes from Multiple Sources (BFS)
Data Structures & Algorithms

This problem involved finding the farthest nodes from multiple source nodes using a breadth-first search.

Q4
Toughest Challenge
Behavioral

What was your toughest challenge, and how did you overcome it?

Q5
Working with Difficult Teammate
Behavioral

Describe a situation where you had to work with a difficult teammate.

Q6
Handling Project Direction Change
Behavioral

How did you handle a project that changed direction mid-way?

Google L4 Onsite - Round 2
google logo
Google
SDE II
June 9, 20253 reads

Summary

I had an onsite interview for a Google L4 role, where I faced a challenging geometry problem requiring me to find a vertical line dividing total area of non-overlapping rectangles. Despite identifying an optimized approach and writing code, I missed edge cases due to time constraints, and I am currently awaiting feedback.

Full Experience

It was an open ended question and things were expected to get clarified by asking questions. Interviewer didn't give any example and I was the one supposed to come up with example. It took 5-10 minutes even to undestand the question, then I explained brute force and optimised approach using binary search with sorting with O(NlogN) time complexity. Only last 20 minutes were left to code and the question was very implementation heavy and I wrote the code but missed few edge cases and time was up. I wish I could have understood the question fast enough to save enough time for coding at the end.

The question was of medium hard level to solve in 35 minutes as (10 minutes was reserved for intro and questions at the end). I am waiting for the feedback from recuiter, it seems I might get H/LH.

Interview Questions (1)

Q1
Vertical Line to Divide Rectangle Areas Equally
Data Structures & AlgorithmsHard

Gven set of points in cartesian plane representing rectangles, find a vertical line defined by it's x co-oardinate which divides the plane into two halfs of equal total areas.

NOTE: Given rectangles cannot overlap with each other. The veritical line should pass through the rectangles.

Google Interview Question | L4 Onsite India (Foreign Interviewer)
google logo
Google
SDE IIIndia
June 8, 20257 reads

Summary

I experienced a friendly and conversational L4 onsite interview at Google India, where I was presented with a coding challenge to implement an image gallery's getNext() function, focusing on handling favorites first.

Full Experience

Follow up: What if markedFavorites[] contains photos strictly in order the photos also are in allImages[]?

(From the above example given by interviewer, you could have easily made that assumption - but they were not meant to be in any such order as per the original question - so you are supposed to ask/write more examples to uncover such test cases or clearly state that you are assuming such and such thing before proceeding with your approach).

The above question might seem too easy - perhaps it should not even belong to L4 onsite rounds!

But remember, interviewers are more interested in how you tackle a problem (even if it is simple), what and how you think, how you clarify expectations and how you arrive at an optimal approach; rather than what data structures you know, which patterns you can identify and which algorithms you can implement!

My interviewer was very friendly and talkative, it felt more like a discussion rather than an interview.

Interview Questions (1)

Q1
Implement getNext() for Image Gallery
Data Structures & Algorithms

You're designing a simple image album viewer.

class Image {};

class Gallery {
    vector<Image> allImages;
    vector<Image> markedFavorites;
    Gallery() {
        // some setup
    }

    Image getNext(); // Returns next image
};

You are to implement the getNext() function such that:

  • The images from markedFavorites should be returned first.
  • Then, return the remaining images from allImages that are not in markedFavorites.
  • Each call to getNext() should return the next image in this combined sequence.

Additional information collected through clarifying questions:

  • Once the end is reached, getNext() should return null.
  • getNext() takes no parameters.
  • You can do some setup in the constructor, but avoid anything too costly.
  • Assume that markedFavorites[] is a subset of allImages[], and both vectors remain unchanged after construction.
  • Order among markedFavorites[] and allImages[] should be maintained.

Example Input:

allImages = {i1, i2, i3, i4, i5, i6, i7, i8, i9, i10};
markedFavorites = {i2, i5, i7};

Expected Sequence of getNext() calls:

i2, i5, i7, i1, i3, i4, i6, i8, i9, i10

Google L4 Onsite Interview Question
google logo
Google
SDE II
June 7, 20254 reads

Summary

This post describes a specific coding question encountered during a Google L4 onsite interview, emphasizing the importance of clarifying assumptions about input properties.

Full Experience

You are given two N-sided dice, P and Q, where each die has N integer values (not necessarily unique or standard).

When rolled, each side is equally likely to appear.

Given the values on each side of dice P and Q, determine:

The number of outcomes where P's roll is greater than Q's roll (i.e., P wins).

Follow up 1: The number of outcomes where Q wins.

Follow up 2: The number of outcomes where both rolls are equal (tie).

Example: (N=3)

P = [1, 2, 4] Q = [2, 2, 5]

Edit 1: Forgot to add that P and Q are always in non-decreasing sorted order. ^ This information was not provided, I had to ask clarifying questions to get it. So if you start coding without asking this, you probably end up with a non-optimal solution.

Interview Questions (1)

Q1
Dice Roll Outcomes (P Wins, Q Wins, Tie)
Data Structures & AlgorithmsMedium

You are given two N-sided dice, P and Q, where each die has N integer values (not necessarily unique or standard).

When rolled, each side is equally likely to appear.

Given the values on each side of dice P and Q, determine:

The number of outcomes where P's roll is greater than Q's roll (i.e., P wins).

Follow up 1: The number of outcomes where Q wins.

Follow up 2: The number of outcomes where both rolls are equal (tie).

Example: (N=3)

P = [1, 2, 4] Q = [2, 2, 5]

Edit 1: Forgot to add that P and Q are always in non-decreasing sorted order. ^ This information was not provided, I had to ask clarifying questions to get it. So if you start coding without asking this, you probably end up with a non-optimal solution.

Google interview questions
google logo
Google
June 6, 20252 reads

Summary

I recently had an onsite coding round at Google where I was presented with a matrix-based problem to count enclosed 'lakes' formed by zeros within land areas (ones). My verdict was 'No Hire' (NH), as I noted forgetting to handle edge cases in my solution.

Full Experience

I recently came across a Google coding round onsite. My verdict was : NH

Interview Questions (1)

Q1
Count Enclosed Lakes in Binary Matrix
Data Structures & Algorithms

Find number of lakes in atlantic pacific ocean Given row,col find the number of lakes for given row,col. Matrix is reprenated by 1' and 0's. => 1 being land 0 being water. for land 1's find the number of 0's covered by 1's.

Google E4 Telephonic Round
google logo
Google
E4
June 3, 20253 reads

Summary

I had a telephonic interview for a Google E4 role where I was asked to solve a problem involving finding the maximum sum of a contiguous subarray with equal start and end elements.

Full Experience

I had a telephonic round for a Google E4 role. The main problem presented was to find i and j such that the sum of a contiguous array from a[i] to a[j] is maximized, with the condition that a[i] must be equal to a[j] and j > i.

Interview Questions (1)

Q1
Maximum Contiguous Subarray Sum with Equal Endpoints
Data Structures & Algorithms

Find i and j such that sum of Contiguous array is maximised.

a[i] = a[j] where j > i Maximise (a[i] + a[i+1] + . . . . + a[j])

Google SDE L3/L4 interview | Virtual Onsite II, III, IV | Taipei, Taiwan
google logo
Google
SDE L3/L4Taipei, Taiwan
June 3, 20253 reads

Summary

I had virtual onsite interviews for a Google SDE L3/L4 role in Taipei, Taiwan, consisting of three technical rounds. I received mixed feedback, passing most rounds but failing one coding interview, which resulted in a 6-month re-application period.

Full Experience

Google 5/21 2nd interview

The interviewer first asked me about the difference between substring and subsequence. Then comes the coding question.


You are given a dict of valid_word= {“” ….} and an input string S. Find all subsequences of size 3 or more in S And check if it’s valid or not.

I only gave the brute force solution, finding all subsequences and check whether the size of subsequence is greater than or equal to 3. Then check whether this subsequence Is in the valid dict or not. The interviewer said I can use itertools.combinations. Later when I was asked the time complexity my brain was not clear so I was stuck for a long time.

from itertools import combinations
valid_dict={“aaa”, “abcd”,...}
input_word
ans=set()
for _len in range(3, len(input_word)):
    for sub in combinations(input, _len):
		cur_sub= “”.join(sub)
        if cur_sub in valid_dict:
			ans.add(cur_sub)    	
return ans	

I later find a similar problem on leetcode. https://leetcode.com/problems/number-of-matching-subsequences/description/


Google 5/23 3rd interview (interval problem)

You are given the following input and output. Design a function that takes input and gives the following output.

Input
Name      Start   End
Abby      10      50
Ben       60      100
Carla     80      120
Donna     150     300

Output Start end Name 10 50 Abby 60 80 Ben 80 100 Ben, Carla 100 120 Carla 150 300 Donna

You can decide input and output format yourself.

I format the input like the following…

[(“Abby”, 10, 50), (“Ben”, 60,100) …]

And I format the output using print.

print(“Start, End , Name”, start, end,name)

Follow up question: What if the input have the same start and end time?? The interviewer asked me to generate an example input test case and implement the solution. Example input:

Input
Name   Start    End
Abby    10      50
Apple   10      40
Ben     60      100
Carla   80      120
Donna  150      300

Google 5/26 4th interview

An array of length n [4, 5, 3, 6, 7 ] Find Index i, j that satisfy the following 3 conditions: 1. i <=j 2. array[i] ==array[j] 3. max( sum(array[i:j+1]) ) return index i, j


Follow up : What if the second condition was taken off? —> a variation of max subarray https://leetcode.com/problems/maximum-subarray/description/

An array of length n [4, 5, 3, 6, 7 ] Find index i, j that satisfy the following conditions: 1. i <=j 3. max( sum(array[i:j+1]) ) return index i, j


6/3 Feedback from HR

I got feed back from HR, she said the result was mixed.

She said my second interview on 5/21 was considered not passing the bar on L3/L4 SDE roles. But I have passed my other 1st, 3rd, and 4th technical interview. (My 1st interview experience: https://leetcode.com/discuss/post/6679035/google-l3-interview-question-taipei-taiw-qd44/)

She will help me to pass my resume and interview results to other teams to see whether I can proceed to the behavioral interview. If there are team leaders interested in me, I can proceed to the behavioral interview.

Personally, I don’t have much expectations about proceeding to the final round. She also said if I want to re-apply SDE roles in Google, normally, I have to wait for at least 1 year. However, because of my solid performance, I can re-apply SDE roles in 6 months.

Interview Questions (5)

Q1
Difference between Substring and Subsequence
Other

Explain the difference between a substring and a subsequence.

Q2
Find Valid Subsequences of Size 3+
Data Structures & Algorithms

Given a dictionary valid_dict of valid words and an input string S, find all subsequences of S that have a size of 3 or more and are present in valid_dict.

Q3
Merge Overlapping Intervals with Names
Data Structures & Algorithms

Given a list of intervals with associated names (e.g., [(“Abby”, 10, 50), (“Ben”, 60,100)]), design a function to merge overlapping intervals and output the start, end, and all names associated with that merged interval. Example Input/Output:

Input
Name      Start   End
Abby      10      50
Ben       60      100
Carla     80      120
Donna     150     300

Output Start end Name 10 50 Abby 60 80 Ben 80 100 Ben, Carla 100 120 Carla 150 300 Donna

Follow up question: What if the input have the same start and end time?? The interviewer asked me to generate an example input test case and implement the solution. Example input:
Input
Name   Start    End
Abby    10      50
Apple   10      40
Ben     60      100
Carla   80      120
Donna  150      300

Q4
Max Sum Subarray with Same Start/End Elements
Data Structures & Algorithms

Given an array arr of length n, find indices i, j that satisfy the following 3 conditions: 1. i <= j 2. arr[i] == arr[j] 3. max( sum(arr[i:j+1]) ). Return i, j. Example: [4, 5, 3, 6, 7 ]

Q5
Maximum Subarray Sum (Kadane's)
Data Structures & Algorithms

Given an array of length n (e.g., [4, 5, 3, 6, 7 ]), find indices i, j that satisfy the following conditions: 1. i <= j 3. max( sum(array[i:j+1]) ). Return i, j.

Google L4 - Screening Interview Question
google logo
Google
SDE II
June 3, 20254 reads

Summary

I underwent a screening interview for a Google L4 role where I was presented with a problem on robot navigation and circular sensor traps. I successfully solved it and was selected for the on-site rounds.

Full Experience

Google L4 - Screening Interview Question

Problem: Robot Navigation with Circular Sensor Traps

You are given a 2D rectangular room of dimensions w × h (width × height). Inside the room are n security sensors, each located at a specific (x, y) coordinate and having a circular detection radius r.

The robot starts at the bottom-left corner (0, 0) and needs to reach the top-right corner (w, h). The robot can move in any direction, including diagonally or along a curved path, as long as it does not enter the detection zone (i.e., the circular area) of any sensor.

If the robot’s path touches or enters even one sensor’s detection zone, the alarm is triggered and the path is invalid.

Task Implement a function:

def pathExists(positions: List[List[int]], w: int, h: int) -> bool:
  • positions: A list of lists, where each element is [x, y, r], representing a sensor located at (x, y) with detection radius r.
  • w: Width of the room.
  • h: Height of the room.

Return:

  • True if there exists a path from (0, 0) to (w, h) without entering any sensor’s zone.
  • False if all possible paths are blocked by sensor field

image.png

Solution:

  1. Consider each sensor as a graph node.
    1. overlapping/touching sensors will have an edge between them
  2. Identify sensors(nodes) whose radius crosses top/left boundary.
  3. BFS/DFS through them and check if you came across any sensors whose radius crosses the other boundary such that it divides the room into 2 halves. -> Return False in this case.

Verdict: Selected for on-site rounds.

Interview Questions (1)

Q1
Robot Navigation with Circular Sensor Traps
Data Structures & Algorithms

You are given a 2D rectangular room of dimensions w × h (width × height). Inside the room are n security sensors, each located at a specific (x, y) coordinate and having a circular detection radius r.

The robot starts at the bottom-left corner (0, 0) and needs to reach the top-right corner (w, h). The robot can move in any direction, including diagonally or along a curved path, as long as it does not enter the detection zone (i.e., the circular area) of any sensor.

If the robot’s path touches or enters even one sensor’s detection zone, the alarm is triggered and the path is invalid.

Task Implement a function:

def pathExists(positions: List[List[int]], w: int, h: int) -> bool:
  • positions: A list of lists, where each element is [x, y, r], representing a sensor located at (x, y) with detection radius r.
  • w: Width of the room.
  • h: Height of the room.

Return:

  • True if there exists a path from (0, 0) to (w, h) without entering any sensor’s zone.
  • False if all possible paths are blocked by sensor field

image.png

Google India | L4 | Rejected
google logo
Google
SDE IIPune/Hyderabad6 years
May 31, 20254 reads

Summary

I detail my 5-month-long Google L4 interview process for Pune/Hyderabad, covering multiple coding rounds and a Googleyness round. Despite successfully solving several algorithmic problems and receiving positive feedback on some rounds, I was ultimately rejected.

Full Experience

Hi Folks,

I wanted to share my Google interview experience for the L4 position (Pune/Hyderabad). I have around 6 years of experience, and the entire process spanned nearly 5 months, with all rounds conducted via Google Meet. While I don’t recall all questions precisely, I’ll share what I can.

Early Jan:

Recruiter from XWF reached out. I requested 10 days for preparation time as I was already practicing on LeetCode.

Mid Feb – Online Screening:

Given a graph and a minimum distance, determine if a path exists from source to target where edges exist only if the distance is less than or equal to threshold.
Follow-up: Instead of a given threshold, find the minimum threshold that allows reaching the target. Example A-->B (2), B-->C(3), A-->C(5), if source and target is A and C, answer would be 3.

Solved part 1, fell short on part 2 (likely solvable via Dijkstra).

End of March – Onsite Rounds:

Round 1:

Given match results, determine possible player rankings.
Example 1: A beats B, B beats C and A beats C. Ranking of A is 1, B is 2 and C is 3.
Example 2: A beats B, B beats C and C beats A. We cannot determine any one's ranking.
Solved with modified topological sort.

Feedback: Recruiter gave me exteremely postive feedback. My assumption on rating: Strong Hire.

Round 2:

We have 27 cards. In this we have 3 sets of 9 cards each. Each card will have a number from 1 to 9 and a colour red, green or blue. We have 4 such sets. So essentially we have 4*27 = 108 cards. A person is given 12 cards from this deck of 108 cards. We have to find if it is a winning combination. Winning combination is possible when we can split the 12 cards into 4 groups of 3. A group is valid when they have all 3 cards with same number and colour or if it forms a sequence of numbers but also of same colour. Was able to solve it using brute force but may have made some syntax errors.

Feedback: Recruiter feedback was neutral. My assumption on rating: Lean Hire.

Round 3:

Started with basic colouring permutations. We are given n nodes and m colours, we need to find out how many ways we can colour these n nodes using m colours. This question had two follow up in which the nodes were connected with some undirected edges but had no cycles.

Follow-up 1: Assuming nodes are connected with some edges, no adjacent nodes can have the same color. Find out the number of ways to colour the graph.

Follow-up 2: Find number of ways to colour the graph if no two nodes at a distance of 2 can share the same color.

Solved first two, missed edge cases in the third.
Feedback: Recuriter said feedback was negative. My assumption on rating: Lean No Hire. She said based on these rating, I may be needed to give an additional coding round but for now she will schedule my googleyness round.

Mid April – Googleyness Round:

Scenario-based discussion around managing unrealistic deadlines as a tech lead. Was able to answer most of the questions with clarity.

Feedback: Final feedback was delayed after the googleyness round even after multiple follow ups. Recruiter reached out in april end and said that she has no feedback yet for the googleyness round. There was silence again so I mailed google candidate support. Last week got feedback from recruiter that googleyness round had a positive feedback with minor mis steps. My assumption on rating would be hire.

Overall, she said that the case was too weak but she will update me in case an additional round is needed. No official rejection yet, but it's safe to assume that I’ve been rejected.

Takeaways:

Interviewers were kind and respectful. The 5-month-long process and lack of closure were frustrating but guess Google does not really care about this as they have too many talented people applying daily.

FYI:

I purposely scheduled all my rounds in night timings and all my interviewers were non-Indian. With all due respect to fellow Indians, from what I heard, Indian interviewers generally have unrealistic expectations so took a gamble with that and I felt it did pay off to some extent.

Interview Questions (7)

Q1
Graph Path with Distance Threshold
Data Structures & Algorithms

Given a graph and a minimum distance, determine if a path exists from source to target where edges exist only if the distance is less than or equal to threshold.
Follow-up: Instead of a given threshold, find the minimum threshold that allows reaching the target. Example A-->B (2), B-->C(3), A-->C(5), if source and target is A and C, answer would be 3.

Q2
Player Ranking from Match Results
Data Structures & Algorithms

Given match results, determine possible player rankings.
Example 1: A beats B, B beats C and A beats C. Ranking of A is 1, B is 2 and C is 3.
Example 2: A beats B, B beats C and C beats A. We cannot determine any one's ranking.

Q3
Winning Combination of Cards
Data Structures & Algorithms

We have 27 cards. In this we have 3 sets of 9 cards each. Each card will have a number from 1 to 9 and a colour red, green or blue. We have 4 such sets. So essentially we have 4*27 = 108 cards. A person is given 12 cards from this deck of 108 cards. We have to find if it is a winning combination. Winning combination is possible when we can split the 12 cards into 4 groups of 3. A group is valid when they have all 3 cards with same number and colour or if it forms a sequence of numbers but also of same colour.

Q4
Graph Coloring Permutations
Data Structures & Algorithms

Started with basic colouring permutations. We are given n nodes and m colours, we need to find out how many ways we can colour these n nodes using m colours. This question had two follow up in which the nodes were connected with some undirected edges but had no cycles.

Q5
Graph Coloring with Adjacent Constraint
Data Structures & Algorithms

Assuming nodes are connected with some edges, no adjacent nodes can have the same color. Find out the number of ways to colour the graph. (This was a follow-up to 'Graph Coloring Permutations' where nodes were connected with some undirected edges but had no cycles.)

Q6
Graph Coloring with Distance-2 Constraint
Data Structures & Algorithms

Find number of ways to colour the graph if no two nodes at a distance of 2 can share the same color. (This was a follow-up to 'Graph Coloring Permutations' where nodes were connected with some undirected edges but had no cycles.)

Q7
Managing Unrealistic Deadlines
Behavioral

Scenario-based discussion around managing unrealistic deadlines as a tech lead.

Preparation Tips

I requested 10 days for preparation time as I was already practicing on LeetCode.

I purposely scheduled all my rounds in night timings and all my interviewers were non-Indian. With all due respect to fellow Indians, from what I heard, Indian interviewers generally have unrealistic expectations so took a gamble with that and I felt it did pay off to some extent.

Google India Software Engineer L4 Interview Experience
google logo
Google
SDE IIIIndia4 years
May 30, 20252 reads

Summary

I successfully interviewed for a Software Engineer L4 role at Google India, and after a 4-month process, I will be joining as SDE III. The experience involved multiple coding rounds focusing on data structures and algorithms, along with a behavioral 'Googlyness' round.

Full Experience

Hi everyone, I'm excited to share that I'll be joining Google as SDE III. This community has been really useful in helping me prepare for the interview. So, I would like to give back to the community by putting my interview experience.

The overall process took close to 4 months starting from the application. The below questions are simplified from the actual question as I can’t be disclosing the actual question.

Phone Screen Given a stream of float values, find the mean of last n values. Follow up - Given a value k, find the mean of last n values excluding k highest values from the n values.

Solution - Solved it using a running sum for the first question. For the follow up I used a max heap along with the running sum to exclude k highest values every time we need to compute the mean.

Verdict - Pass

Interview 1 A graph of movies is given where each movie also has a rating. Two movies are similar if they are connected in the graph. Task is given a movie, we need to find the top N similar movies with highest rating. Follow up - Movies are added dynamically and we need to do same task as above in between. How do you modify the code?

Solution - Solved it with doing a BFS from the given movie, and using a min heap to track the top N movies found so far. I did not have very much time left to answer the follow up but suggested a DSU approach to keep track of similar movies and looping through all movies to find the top N movies using the same min heap approach and modified the existing code.

Verdict - Lean Hire Feedback - There were some issues identified with testing and debugging. I think it was mostly due to the coding of follow up being incomplete.

Interview 2 https://leetcode.com/problems/minimum-window-substring/description/ Same question is copy pasted along with the same test cases.

Solution Gave a sliding window solution where I keep track of frequencies of chars on the window. As I slide the window I will modify the frequencies and I will check the validity of window by comparing the frequencies with the string t.

Verdict - Hire Feedback - Made a couple of implementation mistakes while coding, but I was able to correct some of them by doing dry run on my own. I think this lead to Hire instead of Lean Hire.

Interview 3 Given two n-ary trees A and B where each node has a key K and a value V. We need to create a new tree following the below rules If A just has node (K, V1), B just has node (K, V2), the new node will be (K, V2) If nodes on A and B has same key, the merged node will have it’s children also follow the same rule and the order should follow the order of A first and then followed by order of B.

Ex:

A:
  K1: U1
  |-- K11: U11
  |-- K12: U12
  |-- K13: U13
  K2: U2
B:
  K1: V1
  |--K11: V11
  |--K21: V21
  |--K22: V22
  K13: V13

Merged Node
  K1: V1
  |--K11: V11
  |--K12: U12
  |--K13: U13
  |--K21: V21
  |--K22: V22
  K2: U2

Solution - Solved it using recursion and keeping a hash map of keys and values of B nodes’ children at each call. We’ll then loop through A nodes’ children and construct merged nodes using recursion. If any child node key in A is not present on B, we can just add to merged node. Otherwise, merged node obtained from recursion is added. After all this, we can add remaining B’s child nodes.

Verdict - Strong Hire (Self Verdict) Feedback - I felt this was my best round, where I made a very minor mistake in base case, I was able to figure out some implementation mistakes on my own in the dry run.

Interview 4 - Googlyness I was asked questions on my projects on my resume, and also tested in depth on some of the projects. Then some behaviourial questions are asked. If you follow the STAR pattern and answer the questions, that would suffice.

Interview Questions (7)

Q1
Mean of Last N Values in a Stream
Data Structures & Algorithms

Given a stream of float values, find the mean of last n values.

Q2
Mean of Last N Values Excluding K Highest
Data Structures & Algorithms

Given a value k, find the mean of last n values excluding k highest values from the n values.

Q3
Top N Similar Movies by Rating
Data Structures & Algorithms

A graph of movies is given where each movie also has a rating. Two movies are similar if they are connected in the graph. Task is given a movie, we need to find the top N similar movies with highest rating.

Q4
Top N Similar Movies with Dynamic Updates
Data Structures & Algorithms

Movies are added dynamically and we need to do same task as above in between. How do you modify the code?

Q5
Minimum Window Substring
Data Structures & AlgorithmsHard

LeetCode problem: Minimum Window Substring. Same question is copy pasted along with the same test cases.

Q6
Merge Two N-ary Trees
Data Structures & Algorithms

Given two n-ary trees A and B where each node has a key K and a value V. We need to create a new tree following the below rules: If A just has node (K, V1), B just has node (K, V2), the new node will be (K, V2). If nodes on A and B has same key, the merged node will have its children also follow the same rule and the order should follow the order of A first and then followed by order of B.

Example:

A:
  K1: U1
  |-- K11: U11
  |-- K12: U12
  |-- K13: U13
  K2: U2
B:
  K1: V1
  |--K11: V11
  |--K21: V21
  |--K22: V22
  K13: V13

Merged Node
  K1: V1
  |--K11: V11
  |--K12: U12
  |--K13: U13
  |--K21: V21
  |--K22: V22
  K2: U2
Q7
Behavioral and Project-Based Questions
Behavioral

I was asked questions on my projects on my resume, and also tested in depth on some of the projects. Then some behaviourial questions are asked.

Google | L4 Interview | India
google logo
Google
SDE IIIndia3.9 years
May 29, 20255 reads

Summary

I interviewed for an L4 role at Google in India, undergoing 4 onsite rounds including DSA, system design, and behavioral questions. Despite mixed feedback, my profile is being moved forward for team matching.

Full Experience

My Google Interview Experience

Background

I have a total experience of 3.9 yrs with Microsoft after passing out from an IIT.

I received a call from Google recruiter on April 13th who saw my profile on LinkedIn and discussed the interview process. After a day, he mailed me saying that I will be handed over to another recruiter. The second recruiter called me and informed that a particular Hiring manager liked my profile and that they want to proceed without phone screen. She wanted to schedule the onsite interviews in the first week of May but I pushed back and asked at least a month time for preparation.

Onsite interview 1 - May 19th

Interviewer is from Chicago from Google cloud team

10min - intro and asked me “Explain one of the technical challenge you faced at work”.
10min - Interviewer explaining the question
25min - Discussing the algorithm + coding + follow ups


/*
Assume that a CircularArray data structure is available for your use, an array-like data structure with fixed capacity.  It provides the following functions.

pushFront(E)/pushBack(E): Push the given element E to the front/back of the instance in O(1).

popFront()/popBack(): Remove the front/back element of the instance and return to the caller in O(1).

insert(index, E): Insert the given element E to the specified index.

set(index, E): Overwrite the element at the specified index with the given element E in O(1).

size()/capacity(): Fetch the current/maximum number of elements stored in the instance.

isFull(): Return true if the instance is full, false otherwise.

get(index): Fetch the value at the specified index in O(1).

  • /

/*

CircularArraysDeque<int> d {

data = [[0, 1], [2, 3, 4, 5, 6], [6, 7, 8, 9,10], [11, 12]]

circularArrayCapacity = 5

};

d.insert(8, 100);

Answer - data = [[0, 1], [2, 3, 4, 5, 6], [100, 6, 7, 8, 9], [10, 11, 12]]

  • */

template <typename TypeName>

class CircularArraysDeque {

private:

// Each element is a CircularArray of fixed capacity.

// All elements are filled to capacity except for the first and the last which need not be full.

std::vector<CircularArray<TypeName>> data;

// The capacity of each of the arrays within data.

int circularArrayCapacity;

public:

// Assume get/push/pop/size functions of a deque already implemented.

void insert(int index, TypeName element) {

}

};

Questions asked

  1. Implement this function to provide indexed insertion (handling edge cases properly is imp)
  2. Follow up 1 - Time complexity of the insert as a function of C (circularArrayCapacity) and n (total number of elements in the deque)
    Ans. O(C+n/C)
  3. Follow up 2 - For a given n(total number of elements in deque) what value of C would minimise the TimeComplexity.
    Ans. C=sqrt(n)

Onsite interview 2 - May 20th

Interviewer from Boston, has 20 yrs experience, likes to talk too much, was disturbing a lot during interview.

Question

You are given N movies and similar movies dataset. Each movie has a rating. Given a target movie T and integer K, return top K rated movies similar to T. (paraphrased as the original question was bigger)

Eg.
Ratings:
A:6
B:7
C:8
D:9

Similarity dataset :
A is similar to B
B is similar to C
Ans - Top1 movie similar to A is C based on the rating.
A is similar to B, C but C has higher rating.

Onsite interview 3 - May 21th

Interviewer from Pittsburgh, has 11 years of experience, typed the question slowly which effectively gave me only 30min to solve.

Question -
A standard deck cards
Rank = A, 2,3,4,.. 10, J,Q, K
Suit = H, S, D, C
Every card is represented by = {Rank, Suit}
eg. "AH", "9C"

A Valid set - if it satisfies one of the 2 properties -
Property 1 - The set has 3 or more cards and they all have the same rank
ex. {"2C", "2H", "2S"}, "2C", "2H", "2S","2D"}
non example - {"2C", "2H"}, {"2C", "2H", "2S", "3D"}

Property 2 - The set has 3 or more cards with the same suit and in subsequent increasing order
ex. {"AC", "2C", "3C"}, {"AC", "2C", "3C","4C","5C"}
non ex: {"AC","2C","4C"}

Given a list of N cards, Write a function to group as many cards as possible using the properties so as to minimise the number of cards left ungrouped
Ex. f({"AC", "2C", "3C", "4C", "3S", "3H"}}) - minimum left ungrouped cards are - {3S,3H}
Possible groups - {"AC", "2C", "3C"} {"AC", "2C", "3C","4C"} etc.

Let me know the solution what you guys have for this problem.

Onsite interview 4 - Googlyness on May 23th

Interviewer from India.
Questions were around Conflict management, do you prefer to work in a team or silos, leadership qualities etc.

Feedback as per recruiter

Round 1 - positive
Round 2 - mixed
Round 3 - negative
Round 4 - positive
She didn't specify it in terms of SH, H, etc., but based on my evaluation, it would be SH, LH, LNH, SH/H. She mentioned that my profile will be moved forward for team matching. Hoping for the best to happen.

Interview Questions (5)

Q1
Technical Challenge at Work
Behavioral

Explain one of the technical challenges you faced at work.

Q2
Implement Indexed Insertion for CircularArraysDeque
Data Structures & AlgorithmsHard

Assume that a CircularArray data structure is available for your use, an array-like data structure with fixed capacity. It provides the following functions.

  • pushFront(E)/pushBack(E): Push the given element E to the front/back of the instance in O(1).
  • popFront()/popBack(): Remove the front/back element of the instance and return to the caller in O(1).
  • insert(index, E): Insert the given element E to the specified index.
  • set(index, E): Overwrite the element at the specified index with the given element E in O(1).
  • size()/capacity(): Fetch the current/maximum number of elements stored in the instance.
  • isFull(): Return true if the instance is full, false otherwise.
  • get(index): Fetch the value at the specified index in O(1).

Given the following example structure:


CircularArraysDeque<int> d {
    data = [[0, 1], [2, 3, 4, 5, 6], [6, 7, 8, 9,10], [11, 12]]
    circularArrayCapacity = 5
};
d.insert(8, 100);
Answer - data = [[0, 1], [2, 3, 4, 5, 6], [100, 6, 7, 8, 9], [10, 11, 12]]

Implement the insert(int index, TypeName element) function for the CircularArraysDeque class, providing indexed insertion and handling edge cases properly.


template <typename TypeName>
class CircularArraysDeque {
private:
    // Each element is a CircularArray of fixed capacity.
    // All elements are filled to capacity except for the first and the last which need not be full.
    std::vector<CircularArray<TypeName>> data;
    // The capacity of each of the arrays within data.
    int circularArrayCapacity;
public:
    // Assume get/push/pop/size functions of a deque already implemented.
    void insert(int index, TypeName element) {
    }
};

Follow up 1 - Time complexity of the insert as a function of C (circularArrayCapacity) and n (total number of elements in the deque)

Follow up 2 - For a given n (total number of elements in deque) what value of C would minimise the TimeComplexity.

Q3
Top K Similar Movies by Rating
Data Structures & AlgorithmsMedium

You are given N movies and a similar movies dataset. Each movie has a rating.

Given a target movie T and an integer K, return the top K rated movies similar to T.

Example:

Ratings:

  • A:6
  • B:7
  • C:8
  • D:9

Similarity dataset :

  • A is similar to B
  • B is similar to C

Answer - Top 1 movie similar to A is C based on the rating. A is similar to B, C but C has higher rating.

Q4
Group Cards to Minimize Ungrouped
Data Structures & AlgorithmsHard

A standard deck of cards has:

  • Rank = A, 2,3,4,.. 10, J,Q, K
  • Suit = H, S, D, C

Every card is represented by = {Rank, Suit} e.g. "AH", "9C"

A Valid set - if it satisfies one of the 2 properties -

Property 1 - The set has 3 or more cards and they all have the same rank

  • ex. {"2C", "2H", "2S"}, {"2C", "2H", "2S","2D"}
  • non example - {"2C", "2H"}, {"2C", "2H", "2S", "3D"}

Property 2 - The set has 3 or more cards with the same suit and in subsequent increasing order

  • ex. {"AC", "2C", "3C"}, {"AC", "2C", "3C","4C","5C"}
  • non ex: {"AC","2C","4C"}

Given a list of N cards, write a function to group as many cards as possible using the properties so as to minimise the number of cards left ungrouped.

Ex. f({"AC", "2C", "3C", "4C", "3S", "3H"}) - minimum left ungrouped cards are - {3S,3H}

Possible groups - {"AC", "2C", "3C"} {"AC", "2C", "3C","4C"} etc.

Q5
Conflict Management, Teamwork, and Leadership
Behavioral

Questions revolved around conflict management, preference for teamwork versus working in silos, and leadership qualities.

Preparation Tips

I pushed back and asked at least a month time for preparation.

Google OA question
google logo
Google
May 27, 20253 reads

Summary

This post details a specific Online Assessment (OA) question from Google, focusing on minimizing the diameter of a tree by performing at most k leaf deletions.

Full Experience

You are given a tree consisting of vertices

You can perform the following operation at most times: delete a single leaf of the tree (the operation can produce new leafs, that can be deleted later). The resulting tree must have as small diameter as possible. Find the minimum possible diameter.

Input Format The first line contains two space separated integers n and k. Each of the next lines contains two space separated integers , describing the current tree edge. It's guaranteed that the given graph is a tree.

Constraints

0<n<=1e5 0<k<n

Sample Input #00

4 0 1 2 2 3 4 3

Sample Output #00 3

Sample Input #01

4 1 2 3 4 3 1 4

Sample Output #01 2

Interview Questions (1)

Q1
Minimize Tree Diameter by Deleting Leaves
Data Structures & AlgorithmsHard

You are given a tree consisting of vertices

You can perform the following operation at most times: delete a single leaf of the tree (the operation can produce new leafs, that can be deleted later). The resulting tree must have as small diameter as possible. Find the minimum possible diameter.

Input Format The first line contains two space separated integers n and k. Each of the next lines contains two space separated integers , describing the current tree edge. It's guaranteed that the given graph is a tree.

Constraints

0<n<=1e5 0<k<n

Sample Input #00

4 0 1 2 2 3 4 3

Sample Output #00 3

Sample Input #01

4 1 2 3 4 3 1 4

Sample Output #01 2

Google screening L4
google logo
Google
Software Engineer, L4
May 25, 20253 reads

Summary

I participated in a Google L4 screening round. I was presented with a problem involving processing a stream of messages and implementing logic to prevent printing duplicate messages within a specific time window, including a follow-up condition.

Full Experience

Screening round:

You are given an api which streams messages and you need print a msg only if same msg doesn't appear in the last 5 secs

Follow Up:

you shouldn't print a msg if same msg appears in last 5 secs or in next 5 secs

Interview Questions (2)

Q1
Stream Messages with 5-sec Anti-Duplication
Data Structures & Algorithms

You are given an api which streams messages and you need print a msg only if same msg doesn't appear in the last 5 secs

Q2
Stream Messages with 5-sec Bi-directional Anti-Duplication
Data Structures & Algorithms

you shouldn't print a msg if same msg appears in last 5 secs or in next 5 secs

Google's 5 Months Preparation Comes to an END!
google logo
Google
SDE IIndia
May 25, 20251 reads

Summary

I underwent a Google L3 interview process which included a phone screen, two onsite technical rounds, and a Googlyness round. Despite some positive feedback, negative outcomes in the second technical round and the Googlyness round led to my rejection and a 12-month cooldown period.

Full Experience

Hello everyone.

I am not able to clear the Google's interview despite of preparing for 5 months from Janurary 2025 to till date.

Its very hard to digest when you put your everything for this and still can't go through it.

Interview Experience:

Initial Recruiter Screening Round:

Recruiter has reached out to me in last week of Decemeber on Linkedin and initially I thought it is a fake because of domain (@xwf.google.com). But eventually I come to know its from Google only and had an initial screening round in the first week of January and asked one month for the preparation time.

Phone Screen Round:

My phone screen round was supposed to be happen in the last week of January but due to interviewer's unavailability my phone screen got rescheduled thrice !!

So it happened on 29th March.

Question:

  • Main problem: There are two organisations (A and B), in org A, there are couple of servers connected by the cables through which data is being transferred and in org B there is a hacker who has hacked one of the server and that server got corrupted and From the corrupted node, the data transfer will not happen. Now your task is to find whether the data transfer will happen or not for given source and destination.

I was able to solve this problem in 10-15 mins using BFS. Push all the server in queue if they are not corrupted.

  • Follow Up 1: Find the shortest distance for data transfer from source to destination

Approach: Initially I thought I need to use Dijkstra, and I started adding the edge weights to my graph, but interviewer interrupted me and said, consider they are unit weights.

Then I removed priority_queue and kept queue because it will work in O(1) operation which I mentioned while removing the pq. Interviewer was happy that even while writing the code, I was thinking about the complexities. Solution : Modified the previous solution and introduced distance array.

  • Follow Up 2: Now the corrupted server has ability to corrupt its adjacent neighbor servers till "K" distance. Now you need to tell whether the data transfer will happen or not and also compute the shortest distance.

Approach: I implemented the multi source bfs and added all the corrupted servers into a set and while performing the BFS, Just check whether the server is present into that set or not, If its not present then we can push it into queue. Rest of the code still remains same.

Verdict:

Next day my recruiter called me and said "Your Feedback was very positive, will be moving your profile for onsites"


Then I asked my new recruiter to give me 1.5 months to prepare for the onsites because this was the first time I was appearing for Google L3 position and I don't wanted to make any mistake. And he agreed on that.

Onsite 1:

Main Question:

(Interviewer was from US) https://leetcode.com/discuss/post/6552833/google-l3-onsite-round-1-2025-india-by-a-ndlg/

This was the exact same problem he asked me. The problem statement was very vague. So I was very confused so I asked so many clarifying question and after that I realised its a "GRAPH PROBLEM". So I explained my approach to the interviewer and he said "Why to choose BFS or DFS" I explained why I am more inclined towards BFS. He agreed on that part and I coded the solution. And also explained correct time and space complexity and did dry run on two test cases.

He was impressed with the code quality and code-readability which he mentioned in the interview itself.

Follow Up:

Now find the number of stones you collected?

Approach: Just added a counter and incremented in each BFS interation.

Interview ended on a positive note


Onsite 2:

Main Question:

(Interviewer was from Warsaw) You are given the value n, and there will be an row on a board numbered from 0 to n-1. Now you are standing on the 0th position and you have two coins. Now you flip the coins at every position and based on the outcome you need to move forwared. -> Head, Head : You can move by +2 position -> Head, Tail : Can move by +1 -> Tail, Head : Can move by +1 -> Tail, Tail : Can move by +1

Find out the number of ways you can reach the end position.

Approach: I quickly realized its a DP problem. You can say a jump game variation.

I explained my understanding about the problem to her and took some of the test cases for the output. I was thinking in Combinatorics direction. But she said think in the recursive way or generating a recurrence formula.

AND EVENTUALLY I LOST... She given me some of the hints and I quickly catched it and while this was happening already 40 mins were completed and when I looked at the clock I got panicked because I did not even started to code. I asked her "Can I write down the code?" She said : "Yes"

I started writing the code in rush and due to that I made major mistake. Even after computing the correct recurrence relation. I wrote some different recursive calls.

And at the end, Interviewer mentioned that I missed an edge case. I identified that and I added that

But I knew. I could have done it better but since I always scare about DP problems, maybe that could be the reason I did not performed well in this round.

I WAS SURE I WILL BE RECEIVING THE NEGATIVE FEEDBACK FOR THIS ROUND!


Googlyness Round

(Interviewer was from Google London)

Standard questions were asked to me. For example:

  • Tell me the time when you led a team and how you managed?
  • Tell me if your teammates are not completing their tasks within time.
  • How do you motivate your junior teammates if they are underperfoming
  • What are the points if you want to build the product for any kind of genders(Male, Female, LGBTQ, Person with disability)

This was the question for which I could not able to answer it properly because I did not have any example or answer for this.

But from my side, I have given my best possible answers and interviewer was also seemed satisfied with my answers.

She asked me around 18-20 questions and I answered all of them. Interview was ended on a positive note. where I asked her regarding her work in Google.


Next day after Googlyness, my last onsite about to happen but the my recruiter called me before 3 hours of my last round. He said he has reached out for the feedback. I got broke down. I knew he called me to give negative feedback because why would he will call me before my last round.

He has given the feedback:

  • Onsite 1: Very Positive
  • Onsite 2: Negative (which I knew it)
  • Googlyness: NEGATIVE I was quite surpised with this Googlyness rating because I have given the best possible answers and I was assuming I would at least get SH/H in this round.

Due to 2/3 round's feedback is negative they will not moving ahead with my application.

I broke down into tears 😭. I never ever imagined I would be receiving the Negative in Googlyness. Recruiter said "I was not giving concrete examples in the Googlyness round"

He said Cooldown period is for 12 months. They will reach out to me for L4 role after cooldown. I don't know what to say now! But I am very shattered.

Interview Questions (7)

Q1
Data Transfer in Corrupted Network
Data Structures & Algorithms

There are two organisations (A and B), in org A, there are couple of servers connected by the cables through which data is being transferred and in org B there is a hacker who has hacked one of the server and that server got corrupted and From the corrupted node, the data transfer will not happen. Now your task is to find whether the data transfer will happen or not for given source and destination.

Q2
Shortest Data Transfer Distance (Unit Weights)
Data Structures & Algorithms

Find the shortest distance for data transfer from source to destination

Q3
Data Transfer with Corrupted Neighbors (K Distance)
Data Structures & Algorithms

Now the corrupted server has ability to corrupt its adjacent neighbor servers till "K" distance. Now you need to tell whether the data transfer will happen or not and also compute the shortest distance.

Q4
Number of Ways to Reach End Position with Coin Flips
Data Structures & Algorithms

You are given the value n, and there will be an row on a board numbered from 0 to n-1. Now you are standing on the 0th position and you have two coins. Now you flip the coins at every position and based on the outcome you need to move forwared. -> Head, Head : You can move by +2 position -> Head, Tail : Can move by +1 -> Tail, Head : Can move by +1 -> Tail, Tail : Can move by +1 Find out the number of ways you can reach the end position.

Q5
Leadership and Team Management
Behavioral

Tell me the time when you led a team and how you managed?

Q6
Motivating Underperforming Teammates
Behavioral

Tell me if your teammates are not completing their tasks within time. How do you motivate your junior teammates if they are underperfoming

Q7
Inclusive Product Design
Behavioral

What are the points if you want to build the product for any kind of genders(Male, Female, LGBTQ, Person with disability)

Preparation Tips

I am sharing this interview experience because Leetcode Discuss Community is the best because from here itself I got to know what I need to prepare. "Manzil ke itne pass aake bhi itna dur reh gaya!" ##### I WILL COME BACK STRONGER AND WILL CRACK THE L4 ROLE NEXT YEAR!! Period! Thanks for reading! Here is my preparation summary: image.png

Google L3 Interview Experience
google logo
Google
May 24, 20254 reads

Summary

I experienced a protracted and emotionally draining hiring process for an L3 position at Google, which included numerous reschedules, multiple technical rounds, a behavioral interview, an additional coding challenge, and a team matching call, ultimately concluding with a rejection after several months of delays and communication gaps.

Full Experience

The recruiter reached out to me via linkedin in the middle of Oct 2024, I asked time for preparation for 3 weeks.

TPS is scheduled in the first week of november. Interviewer didnt show up, Rescheduled to second week of nov.

TPS Round: 45 min Question related to Trie and the code was lengthy, i was able to answer only one. Feedback: LH/H

Recruiter reached out to schedule 4 onsite rounds in the next week each round on each day. Interviewers didnt show up for two rounds and My first two rounds are scheduled again to next weeek after googleyness round.

DSA round 3: 45 min Was so nervous and interviewer looked intimidating on top of that and I messed up with time management. I dont exactly remember the question it was related to 2D arrays, given (x,y)coordinates as query and find if that could form rectangle with already existing coordinates in the system. A follow up question was asked to this, something related to finding maximum area among all. Feedback: LH/H

Googleyness round: 1 hr Interviewer was confused and wasted around 15 min as he thought it was DSA round and didnt check his mail properly. He took next 45 min to ask about past experience and leadership and behavioural questions. Answered most of them in STAR method. Feedback: H/SH

DSA Round 1: 45 min (Last week of Nov) The interviewer asked me question related to Graph traversal and i used BFS, a follow up question was asked. I coded optimized and explain it well, The Interviewer seemed pretty satisfied. Feedback: SH

DSA Round 2: 45 min (First week of Dec) I Vaguely remember this round. I was asked question on Binary trees and a follow up on n-ary trees. I coded and explained it well Feedback; H/SH

i got a call last week of Dec and Team Fit Call was scheduled next day. Team Matching round: 1 hr HM explained his team and the projects they are working on and tech stack and asked about my experience and everything that i put on my resume and few questions on Cloud tech and tools.

My package went to HC and after two to three weeks the recruiter reached out to me for additional coding interview.

Additional DSA round: 45 min I didnt prepare for this as i had like a day to prepare. I remember the interviewer asked something about arrays and binary search and i coded it and explained it to him in given time.

Recruiter didnt care to reach out to me for more than three weeks and i couldnt reach out to him by any means but mail. I kept sending mail for checking in for update. I was ghosted and after some time i got mail that my profile was sent across for team matching. You can imagine i was very exhausted at this point and this was around last week of Jan 2025.

After 2 months of ghosting, recruiter called me and said that they werent impressed with the feedback received for additional round and moving onto other candidates.

That's the end of my gruesome and mentally taxing hiring process. Didnt want to post but thought it would help someone.

Interview Questions (2)

Q1
Form Rectangle with Existing Coordinates & Max Area
Data Structures & Algorithms

Given (x,y)coordinates as query and find if that could form rectangle with already existing coordinates in the system. A follow up question was asked to this, something related to finding maximum area among all.

Q2
Behavioral Questions: Past Experience & Leadership
Behavioral

The interviewer asked about my past experience, leadership, and general behavioural questions.

Preparation Tips

I requested 3 weeks for initial preparation. For the additional DSA round, I didn't prepare much as I only had a day's notice.

Google Interview Question | May-2025
google logo
Google
May 24, 202561 reads

Summary

I recently went through a Google interview process which included a mock interview and three subsequent coding rounds. The problems covered various aspects of data structures and algorithms, ranging from array manipulation and graph cycle detection to log stream processing and graph reachability within specific time constraints.

Full Experience

My interview experience with Google started with a mock interview round. This was followed by three distinct coding rounds, each presenting its own set of challenges.

In the mock interview, the first question was a standard LeetCode problem about finding the shortest unsorted continuous subarray. The second question was more involved, asking to identify circular dependencies in an issue tracking system represented by a 2D boolean array of blockers.

The first coding round focused on designing a log stream processor. I needed to implement methods to register chat events and then efficiently determine the user with the most active conversations, where any message exchange between two unique users counted as a single conversation.

The second coding round presented a scenario where I had to deduplicate incoming messages based on a time window. The requirement was to show a message only if it hadn't been shown in the last 10 seconds.

Finally, the third coding round involved a graph problem. I was asked to design a class that, given a starting city in a map of one-way roads without cycles, could find all reachable cities from that starting point. The problem emphasized that the city names are unique and the scale could be large.

Interview Questions (5)

Q1
Shortest Unsorted Continuous Subarray
Data Structures & AlgorithmsMedium

The problem asks to find the shortest continuous subarray that, if you sort only this subarray in ascending order, then the whole array will be sorted in ascending order.

Q2
Find Circular Dependencies in Issue Tracking System
Data Structures & AlgorithmsHard

Imagine we are a software development company and we manage our dev process using an issue tracking tool. Each issue has an ID and also a list of IDs of issues which block it (Blockers or parents). As a result we have 1 or multiple unidirectional graphs because there could have several root issues. At some point in time someone added an issue A as a Blocker of issue B. But because A was already blocked by the descendants of the current issue B (descendants of B are the issues that are transitively blocked by B), this created a circular dependency. After this our UI issue tracking tool (Taskflow) stopped showing issues correctly. Our task is to find out all circular dependency loops. The input is a 2D boolean array of blockers assignments. The row number is the issue ID. The column number is Blocker issue ID. So entry (i, j) is True means that issue i is blocked by issue j.
Example input:
Where for (i,j)
(0,0)=False | (0,1)=False | (0,2)=True
(1,0)=True | (1,1)=False | (1,2)=False
(2,0)=False | (2,1)=True | (2,2)=False
The output is a list of dependency cycles. The order inside one cycle doesn't matter.
Example:
[
[0, 2, 1] (as well can be 2,1,0 or 1,0,2)
]

Q3
Log Stream Processor - Most Active User
Data Structures & AlgorithmsMedium

You're given a log stream of a chat application. Every log entry has the following fields: timestamp: long - the number of seconds that have elapsed since 1970-01-01. sender: str - username of the sender receiver: str - username of the receiver message_text: str - the message payload We want to implement a log stream processor which supports two methods: RegisterEvent(timestamp, sender_username, receiver_username, message_text) - registers the event that the message have been sent GetMostActiveUser() - Returns the user with the largest number of active conversations. We count any amount of messages exchanged between two unique users as a single conversation.
Examples:
RegisterEvent(0, "A", "B", "Hi!")
GetMostActiveUser() -> "A" or "B"
// Both users have a single conversation.
RegisterEvent(10, "A", "C", "Hi!")
RegisterEvent(15, "C", "A", "Hi, there!")
GetMostActiveUser() -> "A"

Q4
Deduplicate Messages in a Time Window
Data Structures & AlgorithmsMedium

The problem involves processing a stream of messages with timestamps and only displaying them to the user if they haven't been shown in the last 10 seconds. Messages should be shown in their timestamp order, and within a 10-second window, duplicates should be suppressed.
Example Messages Received, with Timestamps:
10 solar panel activated
11 low battery warning
12 tire one: low air pressure
13 solar panel activated
14 low battery warning
21 solar panel activated
35 solar panel activated
Example Messages Shown to User:
10 solar panel activated
11 low battery warning
12 tire one: low air pressure
21 solar panel activated
35 solar panel activated

Q5
Find All Reachable Cities from a Starting City
Data Structures & AlgorithmsEasy

Given a map of cities and one-way roads (edges), where city names are unique and there are no cycles, the task is to design a class that, starting from a given city, can return all other cities reachable from it. The scale of cities and roads can be large.
Example:
cities = [a, b, c, d]
edges: [[a,b], [b,c], [a,d]] (example format)
input: "a"
output: [b, c, d]

Google L4 - Interview experience
google logo
Google
L4 Software EngineerIndia4.5 years
May 24, 20256 reads

Summary

I recently received an offer for the L4 Software Engineer role at Google India after a structured and challenging interview process that included four technical rounds and a behavioral round, sharing my journey and learnings.

Full Experience

🗓️ Interview Journey (Quick Recap)

  • Started with a recruiter call in January 2025 to discuss role expectations and background.
  • Had four technical interviews throughout February, each testing different aspects of problem-solving and code clarity.
  • Attended the Googliness (behavioral) round in March, focused on teamwork and decision-making.
  • Finally, I had a team matching call in early May, and received the offer shortly after 🎉

💬 Googliness & Behavioral Round

This round focused on qualities like communication, ownership, problem-solving mindset, and collaboration. I was asked about how I’ve handled challenging scenarios, worked with teams, and contributed meaningfully beyond code.


✅ Final Thoughts

The process was structured, challenging, and rewarding. Each interview tested a different aspect of engineering ability—from problem solving and abstraction to communication and design thinking.

Interview Questions (5)

Q1
Encode and Decode a Directed Graph
Data Structures & Algorithms

I was asked to implement functionality to convert a directed graph (with int values and neighbor nodes) into a storable format and then reconstruct it.

This tested:

  • Graph traversal (DFS/BFS)
  • Cycle handling
  • Maintaining node identity across serialization
Q2
Reach a Target Volume with N Jugs
Data Structures & Algorithms

Given multiple water jugs with different capacities, I had to determine whether it was possible to measure an exact amount using fill, empty, and pour operations.

This tested:

  • Modeling complex state transitions
  • Using BFS or DFS to explore all valid states
  • Avoiding revisits using visited tracking
Q3
Alice and Bob Reach a Destination with Minimum Combined Cost
Data Structures & Algorithms

Two individuals start from different nodes in a weighted graph. The goal was to find a destination such that the sum of their travel costs was minimized.

This involved:

  • Multi-source shortest path logic
  • Combining cost paths
  • Handling disconnected components
Q4
Merging Car Rental Intervals
Data Structures & Algorithms

Given a list of car rental bookings represented as time intervals, I was asked to merge overlapping bookings and return an optimized schedule.

This tested:

  • Sorting logic and boundary conditions
  • Clean iteration and merging
  • Efficiency and correctness
Q5
Googliness & Behavioral Round Questions
Behavioral

This round focused on qualities like communication, ownership, problem-solving mindset, and collaboration. I was asked about how I’ve handled challenging scenarios, worked with teams, and contributed meaningfully beyond code.

Preparation Tips

If you're preparing:

  • Be consistent with your practice
  • Focus on understanding patterns, not just solving problems
  • Reflect on your past experiences for behavioral questions
  • Prioritize clarity in communication and clean coding habits

Good luck to everyone preparing for interviews. Keep learning, and trust your progress 💪

Google | L4 | Hyderabad | DS/MLE Interviews Experience
google logo
Google
MLE L4Hyderabad4.5 years
May 23, 20252 reads

Summary

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

Full Experience

YOE - 4.5 years as a Data Scientist.

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

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

Total 5 interview rounds (including Phone screen)

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

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

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

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

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

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

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

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

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

Googlyness and Leadership Round Was asked questions of the format

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

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

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

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

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

Interview Questions (7)

Q1
Group Rotated Strings
Data Structures & Algorithms

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

Q2
Topological Sort for Storage Deletion
Data Structures & Algorithms

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

Q3
Minimum Cost Teleporter Path with Repairs
Data Structures & Algorithms

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

Q4
Giving Harsh Feedback
Behavioral

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

Q5
Going Out of Your Way
Behavioral

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

Q6
Future Learning Plans
Behavioral

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

Q7
Email Retrieval and Ranking System Design
System Design

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

Preparation Tips

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

Google Phone Screen Interview
google logo
Google
May 22, 20253 reads

Summary

I had a phone screen interview with Google where I was asked a Data Structures & Algorithms question and a system design follow-up. I received positive feedback and moved to the on-site round, eventually receiving a down-leveled offer.

Full Experience

I was asked the question to count the number of steps to reach 1 by following the Collatz sequence. That's it only one question. Follow up was about writing it as a scalable system, handling overflows, and kind of like a low level system design. Feedback: moving to the on-site Update: I eventually had the onsite, but got down levelled. I don't know if I will yet take the offer or not. Will share the details separately

Interview Questions (2)

Q1
Collatz Sequence Steps
Data Structures & Algorithms

Count the number of steps to reach 1 by following the Collatz sequence.

Q2
Collatz Sequence Scalable System Design
System Design

Design a scalable system for the Collatz sequence problem, handling overflows, and a low-level system design.

Google L3 Reject
google logo
Google
SDE I
May 22, 20254 reads

Summary

I completed a phone screen and four onsite rounds for a Google L3 position, but was ultimately rejected despite feeling the questions weren't hard.

Full Experience

TPS - Folder and file structures, where a folder can have a folder or file or both and a file will have a size, question was to find out the all the file sizes

After a week - positive feedback After 2-3 weeks 4 onsite rounds were scheduled continuosly, had multiple reschedules.

onsite 1 - An undirected graph with ring, question was to visit all the nodes in the graph, followup to check the validity of the ring.

onsite 2 - Two strings a and b, to form string a, what is the minimal number of subsequence from b.

onsite 3 - Similar to the TPS question structure, but find the top k file sizes.

Googliness - Went okayish, but got over within 30 minutes

All interviews were in the night time, hence not indian interviwers.

In the 3rd week after onsites, recruiter mentioned that they are not proceeding. Feedback was some areas to improve and some strong areas, which I felt as the standard respone template. Honestly there was no bad rounds as such, because the questions I got was not hard. Feeling bad after rejection, but there is always next time 🙂.

Interview Questions (5)

Q1
File System: Sum All File Sizes
Data Structures & Algorithms

Folder and file structures, where a folder can have a folder or file or both and a file will have a size, question was to find out the all the file sizes

Q2
Graph Traversal with Ring Detection
Data Structures & Algorithms

An undirected graph with ring, question was to visit all the nodes in the graph, followup to check the validity of the ring.

Q3
Minimum Number of Subsequences
Data Structures & Algorithms

Two strings a and b, to form string a, what is the minimal number of subsequence from b.

Q4
File System: Top K File Sizes
Data Structures & Algorithms

Similar to the TPS question structure, but find the top k file sizes.

Q5
Googliness Interview
Behavioral

Went okayish, but got over within 30 minutes

Google L4 Phone Screen Round (US)
google logo
Google
SDE IIUS
May 22, 20253 reads

Summary

I had a phone screen round for Google L4 in the US, where I solved a binary tree pathfinding problem, and I cleared the round.

Full Experience

Given 2 numbers and an unsorted binary tree, find the path between them and return it as a string with the words "up", "right" and "left"

       1
     /  \
    2    7 
   / \
  8   6
 /
5

Path(root, 6, 7) -> "up, up, right"
Path(root, 7, 8) -> "up, left, left"
Path(root, 5, 6) -> "up, up, left"

I asked the following questions:

  • are the node values unique? Yes
  • Will both nodes be always present in tree? Yes

Solved it using the following approach:

  1. Find LCA node between the two nodes.
  2. A path function that will record L/R from LCA node to first node.
  3. Same path function that will record L/R from LCA node to second node.
  4. Form the answer string a. place all "up" strings for path from LCA to start node b. append the recorded path from LCA to end node

Interviewer asked if I can optimise and decrease the traversals, as I was traversing the tree thrice. But couldn't think well in that interview setting.

EDIT: Cleared the phone screen round. Moving Onward

Interview Questions (1)

Q1
Find Path Between Two Nodes in Binary Tree
Data Structures & AlgorithmsMedium

Given 2 numbers and an unsorted binary tree, find the path between them and return it as a string with the words "up", "right" and "left"

       1
     /  \
    2    7 
   / \
  8   6
 /
5

Path(root, 6, 7) -> "up, up, right"
Path(root, 7, 8) -> "up, left, left"
Path(root, 5, 6) -> "up, up, left"

I asked the following questions:

  • are the node values unique? Yes
  • Will both nodes be always present in tree? Yes
Google L5 Screening Interview Question
google logo
Google
SDE III
May 21, 20253 reads

Summary

I was asked to implement a class for a union of ranges during my Google L5 screening interview.

Full Experience

During my Google L5 screening interview, I was presented with the following problem: Implement a class that acts as a union of ranges. The class should allow to: - Insert ranges into the class. - Query the class to check if a particular point is in any of the inserted ranges. Example: Ranges Inserted: 2-5 9-13 Points Queried: 0 -> False 2 -> True 10 -> True

Interview Questions (1)

Q1
Implement Range Union Class
Data Structures & Algorithms

Implement a class that acts as a union of ranges. The class should allow to: - Insert ranges into the class. - Query the class to check if a particular point is in any of the inserted ranges. Example: Ranges Inserted: 2-5 9-13 Points Queried: 0 -> False 2 -> True 10 -> True

Google Oa question
google logo
Google
May 20, 20252 reads

Summary

This post details a specific question encountered during a Google Online Assessment (OA).

Full Experience

Given an integer array nums, a window size windowSize, and an integer k, return a list of averages for each sliding window of size windowSize as the window moves from left to right across the array. When calculating the average for each window, ignore the largest k numbers within that window.

Constraints:

1 <= windowSize <= nums.length <=1e5

0 <= k < windowSize

-1e4<= nums[i] <= 1e4

Example 1:

Input: nums = [10, 20, 30, 40, 50, 60], windowSize = 3, k = 1 Output: [15.0, 25.0, 35.0, 45.0] Explanation:

Window [10, 20, 30]: Ignoring the largest number 30, the average is (10 + 20) / 2 = 15.0 Window [20, 30, 40]: Ignoring the largest number 40, the average is (20 + 30) / 2 = 25.0 Window [30, 40, 50]: Ignoring the largest number 50, the average is (30 + 40) / 2 = 35.0 Window [40, 50, 60]: Ignoring the largest number 60, the average is (40 + 50) / 2 = 45.0 Example 2:

Input: nums = [5, 1, 3, 8, 7], windowSize = 2, k = 0 Output: [3.0, 2.0, 5.5, 7.5]

Example 3:

Input: nums = [4, 4, 4, 4], windowSize = 2, k = 1 Output: [4.0, 4.0, 4.0]

Interview Questions (1)

Q1
Sliding Window Average Excluding Largest K Numbers
Data Structures & AlgorithmsMedium

Given an integer array nums, a window size windowSize, and an integer k, return a list of averages for each sliding window of size windowSize as the window moves from left to right across the array. When calculating the average for each window, ignore the largest k numbers within that window.

Constraints:

1 <= windowSize <= nums.length <=1e5

0 <= k < windowSize

-1e4<= nums[i] <= 1e4

Example 1:

Input: nums = [10, 20, 30, 40, 50, 60], windowSize = 3, k = 1 Output: [15.0, 25.0, 35.0, 45.0] Explanation:

Window [10, 20, 30]: Ignoring the largest number 30, the average is (10 + 20) / 2 = 15.0 Window [20, 30, 40]: Ignoring the largest number 40, the average is (20 + 30) / 2 = 25.0 Window [30, 40, 50]: Ignoring the largest number 50, the average is (30 + 40) / 2 = 35.0 Window [40, 50, 60]: Ignoring the largest number 60, the average is (40 + 50) / 2 = 45.0 Example 2:

Input: nums = [5, 1, 3, 8, 7], windowSize = 2, k = 0 Output: [3.0, 2.0, 5.5, 7.5]

Example 3:

Input: nums = [4, 4, 4, 4], windowSize = 2, k = 1 Output: [4.0, 4.0, 4.0]

Google L4 Interview Experience
google logo
Google
SDE II
May 20, 20253 reads

Summary

I shared my experience interviewing for an L4 role at Google, detailing multiple rounds that were generally positive and collaborative, although I sometimes struggled with optimal solutions or advanced follow-up questions. I received positive feedback despite some noted areas for improvement.

Full Experience

Positive. The interviewer was enthusiastic and collaborative. The interview felt more like a discussion than a questioning. I was able to voice my thoughts well due to the collaborative nature of the interview, come up with an optimal approach, and then code it up quite quickly. At the end as a followup interviewer asked if there are other optimisations possible, and as I was trying to find it out, time ran out. (PS: I still do not know what optimisation is possible on my approach :P). I received a positive feedback, with a note that I was not able to reach the most optimal solution but the solution was optimal enough as the BigO complexity was the same.Neutral. The interviewer gave the question, and as I was working through my thoughts on the solutions, the interviewer asked questions about my approach. I was able to explain my thoughts and once the interviewer was satisfied, I went ahead to coding. Post my code, interviewer identified some edge cases which were not addressed, which I then addressed in my code as well. Then interviewer asked if I can optimise it even further. Here I was slightly stuck and the interviewer had to give a hint, post which I was able to figure out the most optimal solution, and then code it. I was barely able to finish the code and dry run, with just 1 minute left in my interview time. I had to write code for two different approaches in this round which led to improper time management on my part. Feedback was positive, with a note that debugging and edge case handling was lacking.Very Positive. The interviewer was very enthusiastic and collaborative. Once the question was given, I started with clarifying questions to ensure I understood the question. Some of my clarifying questions were appreciated by the interviewer as identifying the gaps in the question. I came up with an approach and interviewer was satisfied with the approach. I went ahead to coding, and then interviewer asked for dry run with multiple sample inputs. Within this discussion, I corrected some small bugs, and made the code more readable and improved the understandability of the code. I then realised that there is an optimisation possible which would greatly improve the complexity of my solution. I mentioned this to the interviewer, and he said while there is a more optimal approach, he is satisfied with my current approach. In this round, even though I did not code the most optimal approach, due to the highly collaborative and feedback driven round, my experience was positive, and the interviewer also gave a very positive feedback.Neutral. I started with a lot of clarifying questions to make sure I have the right understanding of the problem. I then explained a basic approach, which the interviewer was satisfied with. However, I came up with the solution very quickly and therefore instead of coding the first approach, he asked me the follow up question, and once I gave the approach for that, he asked me to code that approach. I completed the code for that approach. The interviewer went through the code very minutely, and had a lot of questions regarding the code to understand it better. This took a good amount of time. Once he was satisfied with my code, he then asked me the second follow up. This follow-up was challenging for me, and I was unable to come up with a solution for the follow-up in the interview time. I did however come up with the optimal solution on my own right after the interview ended. Therefore this was also an area of my time-management which I could have improved. I took a long time to explain my code and approach for the first follow-up because I did not think there would be another follow-up. My feedback was positive, with a note that my debugging skills are slightly lacking. I am not sure why this feedback note was there as we did not identify or fix any bugs. The dry runs were also all successful. It is possible that I truly missed a bug, but it was never mentioned in the interview itself.

Interview Questions (4)

Q1
Balance Cake Material with Horizontal Cut
Data Structures & Algorithms

There are a number of cakes laid out on a table. Each cake is square in shape, and its edges are placed parallel to the edge of the table. The location and size of each cake is given to you. There is a large horizontal blade over the table that can cut across all the width of the table. Find the exact vertical position of the blade so that it divides all of the cake material into two equal portions.

Input: A List where class Cake { double x; double y; double side; }

Output: double, the distance from the top edge of the table at which you make the cut.

Input: [Cake(x=1.0, y=0.0, side=2.0), Cake(x=4.0, y=0.0, side=2.0)] Output: 1.0

0 1 2 3 4 5 6 0 +---+---+---+---+---+---+---+ | | X | X | | X | X | | 1 +---+---+---+---+---+---+---+ | | X | X | | X | X | | 2 +---+---+---+---+---+---+---+ | | | | | | | | 3 +---+---+---+---+---+---+---+

Input: [Cake(x=1.0, y=0.0, side=2.0), Cake(x=4.0, y=1.0, side=2.0)] Output: 1.5

0 1 2 3 4 5 6 0 +---+---+---+---+---+---+---+ | | X | X | | | | | 1 +---+---+---+---+---+---+---+ | | X | X | | X | X | | 2 +---+---+---+---+---+---+---+ | | | | | X | X | | 3 +---+---+---+---+---+---+---+

Q2
Group Strings by Equidistant Characters
Data Structures & Algorithms

Given a list of strings as input, group strings such that any two strings in a group are buddies with each other. Two strings are buddies with each other if every character in the first string is equidistant from the character at the corresponding index of the second string.

Example 1: Input: ["abc", "def", "pat", "qbu"] Output: [["abc","def"], ["pat","qbu"]]

Example 2: Input: [ "az", "zy","cat","bzs"] Output: [["az","zy"], ["cat","bzs"]]

Q3
Transpose On-Call Schedule by Interval
Data Structures & Algorithms

Given a sample input which shows data of team members' on call rotation, where the onCall timings for team members are given based on member name, transpose this data such that onCall timings are shown based on onCall intervals, where all people onCall during that interval are shown for that interval.

Sample input:

NameStartEnd
Abby10100
Ben5070
Carla60120
David150300
Abby120150

Sample output:

StartEndNames
1050Abby
5060Abby, Ben
6070Abby, Ben, Carla
70100Abby, Carla
100120Carla
150300David
Q4
Find Time to Buy All Items
Data Structures & Algorithms

There’s a shop selling n items, in which the i-th item has an integer id_i and will be available from time point a_i to b_i. Assume you have a list of ids of some items to buy. Find a time point that you can buy all the items in your list.

Example:

n = 3 Item 1: id_1 = 1, a_1 = 1, b_1 = 10 Item 2: id_2 = 2, a_2 = 4, b_2 = 6 Item 3: id_3 = 3, a_3 = 6, b_3 = 8

Your list: L = (1, 2) → One possible solution: t = 4.

Follow up:

  1. What if there are multiple entries for the same itemId?
  2. What if the required list has duplicate itemIds. Duplicates mean the itemId has to purchased multiple times (as many times as its repeated, each purchase from a different time slot).
Google SWE (L3) Interview experience - Selected
google logo
Google
SWE (L3)2.5 years
May 20, 20252 reads

Summary

I successfully interviewed for a SWE L3 role at Google, navigating through several problem-solving and behavioral rounds. After a successful team matching process for a backend role, I received an offer.

Full Experience

Current Exp: SDE 2 at US based MNC (2.5 yrs of FTE at the start of the interview process)

Received email from recruiter. Initial discussion round took place on 4th Feb 2025.
After this, I asked for 2 weeks preparation time.

Round 1: 18th Feb
Problem solving (Elimination)

1. Check if 2 intervals overlap (basic version)
2. Follow up - Given a list, check if any 2 intervals overlap (easy - only sorting is needed)
3. Follow up - Given a list, count the number of overlapping intervals
(Line sweep algorithm)
This was the only elimination round. After this, for the next 4 rounds, I was supposed to get an aggregated feedback.

Round 2: 20th March
Problem solving

Given a date and an offset, return the new date which is offset days less then current date
(Easy problem statement, Lot of edge cases, solved most of them. Interviewer was looking for the technique in which this kind of lengthy problem is solved in a short time)

Round 3: 21st March
Problem solving

Given an array of integers, find the sum of all good arithmetic subarrays.
A good arithmetic subarray has a constant diff of +1 or -1.
Ex. [3,4,5] and [9,8,7] are good subarray but [5,6,8] or [4,6,8] is not good
Find the sum of all good subarrays means find the sum of all elements occurring in all the good subarrays
(It was a difficult one TBH, but somehow I was able to solve this)

Round 4: 24th March
Problem solving

You have a database of size M. The dataset is in the form of a binary string. Find the position of all the set bits in the binary string. Database is hidden. You can only query(L,R) which will return true if there is at least one set in (L...R) otherwise false. Minimise the number of queries required to reach the solution.
(Interesting and a new kind of problem. I solved this quickly. Also provided the alternate approach for solving)
In the last 2-3 mins, the interviewer gave a really hard version of the same problem. I was trying to solve that, but ran out of time.

Round 5: 28th MARCH
Googliness

1. Team is not coming up with creative ideas. How to identify the problem, fix the problem,
and check the impact
2. Conflict with teammate
3. Cross functional dependency, other team is not complying to the priority of the task
4. In a tight deadline project, one teammate is sick. How to manage when all other teammates are busy. Motivate the team for cover for the sick member.

I did not receive any kind feedback for any of the rounds, but I knew all rounds went good.

Team Matching Round
After this, a team matching round was scheduled. It was based on Android role based on flutter, but I am more into backend with Java and Spring boot. Hence this round was not cleared.

Next week, another team matching round was scheduled. It was for a backend team only based on Java. The team manager discussed about my past experiences on system design and many other backend concepts. The discussion went really great IMO.

One week later, I received the final offer letter !!

PS: Hardwork always pays off.
(Try solving the problem in round 4 by yourself, it is a good one)

Interview Questions (10)

Q1
Check If Two Intervals Overlap
Data Structures & AlgorithmsEasy

Given two intervals, determine if they overlap.

Q2
Check For Overlapping Intervals in a List
Data Structures & AlgorithmsEasy

Given a list of intervals, determine if any two intervals overlap.

Q3
Count Overlapping Intervals
Data Structures & AlgorithmsMedium

Given a list of intervals, count the number of overlapping intervals.

Q4
Calculate Date with Offset
Data Structures & AlgorithmsEasy

Given a date and an offset, return the new date which is offset days less than the current date.

Q5
Sum of Elements in Good Arithmetic Subarrays
Data Structures & AlgorithmsHard

Given an array of integers, find the sum of all good arithmetic subarrays.

A good arithmetic subarray has a constant difference of +1 or -1.
Example: [3,4,5] and [9,8,7] are good subarrays, but [5,6,8] or [4,6,8] are not good.

The goal is to find the sum of all elements occurring in all the good subarrays.

Q6
Find Set Bits in Hidden Binary String with Query(L,R)
Data Structures & AlgorithmsHard

You have a database of size M. The dataset is in the form of a binary string.

Find the position of all the set bits in the binary string. The database is hidden.

You can only query (L,R) which will return true if there is at least one set bit in the range (L...R) (inclusive), otherwise false.

Minimize the number of queries required to reach the solution.

Q7
Fostering Team Creativity
Behavioral

Your team is not coming up with creative ideas. How would you identify the problem, fix it, and check the impact of your solutions?

Q8
Resolving Teammate Conflict
Behavioral

Describe a situation where you had a conflict with a teammate and how you resolved it.

Q9
Managing Cross-Functional Dependencies and Priorities
Behavioral

How would you handle a situation involving a cross-functional dependency where another team is not complying with the priority of your task?

Q10
Managing Team During Teammate Sickness Under Deadline
Behavioral

In a tight deadline project, one teammate becomes sick. How would you manage the situation when all other teammates are busy? How would you motivate the team to cover for the sick member?

Google | L4 | India | May 2025 [Offer]
google logo
Google
India
May 17, 202513 reads

Summary

I successfully navigated a multi-round interview process with Google for an L4 position in India, culminating in a job offer. The process involved a phone screen, three onsite technical rounds, a Googlyness round, a hiring manager round, and team matching.

Full Experience

Timeline:

  • Early Feb: Recruiter reached out
  • Mid Feb: Phone Screening Round
  • Early April: All 3 technical onsite rounds
  • Late April: Googlyness Round
  • Early May: Hiring Manager Round
  • Mid May: Offer!

Interview Experience:

Phone Screening Round: Problem: https://leetcode.com/problems/separate-squares-i/description/. There was a big story around this problem but in essence it was the question I have linked above. I solved the problem without taking any hints but my implementation of binary search on decimal values was a bit messy. The interviewer asked me to spend more time refining it, which I did.

My thoughts: I hadn't seen this problem before the interview but found it afterward. I felt a bit slow and over-communicated at times, but the interviewer seemed satisfied with my approach. However, the interviewer was satisfied with my approach so I was hopeful.

Result: Recruiter called and said the feedback is positive but I could have done better time management. I believe the interviewer would have asked this problem as a follow up: https://leetcode.com/problems/separate-squares-ii/description/ but there was no time left. However, since the screening round only has Hire/No Hire verdicts, so mine would have been Hire.

Onsite Round 1: Problem: You are working on a data sequence but the data is too big. Fortunately the data has a lot of repeated values.So you would want use the run-length encoding (RLE) compression technique.

Input: 
2, 1, 1, 2, 5, 5, 3, 3
Output (RLE would look like):
2 ->1, 1 -> 2, 2 -> 1, 5 -> 2, 3 -> 2

Write a method to do this encoding.

Follow up 1: Given the encoded list and an index, return the value that was present at that index in the original list. Follow up 2: Assume the original list was sorted. You are given the encoded list of the original list and a value. You need to return the index of the first occurrence of this value in the original list.

My thoughts: The problem was initially vague, so I had to ask a lot of clarification questions. Once we narrowed it down to a list of integers, the implementation was straightforward. I was able to solve the follow ups as well with minimal changes in code for the original problem. I was feeling confident and was expecting a strong positive feedback.

Result: The recruiter's feedback was positive, but she did mention a couple of issues, specifically that my code focused only on one data type. This came as a surprise to me, but I guess the interviewer expected better clarification questions and better scoping from my end. My expectation of this round was Strong Hire but based on recruiter's feedback I think it would have been a Hire.

Onsite Round 2: Problem: https://leetcode.com/discuss/post/6551079/google-data-engineer-screening-round-by-7zhd9/.

The interviewer joined 5 minutes late and then proceeded to type out the question instead of pasting it. This easily wasted about 20 minutes. Luckily I had solved this question before and was able to come up with the solution very quickly. There was scope for optimization but they did not ask for it. Instead, with around 7-10 mins remaining they said they will ask language (cpp) specific questions. He wrote down these method signatures and asked me multiple questions around the same:

1. Node Merge(const Node& n1, const Node& n2) 
2. Node Merge(const Node n1, const Node n2) 
3. Node Merge(const Node* n1, const Node* n2) 
4. Node Merge(Node* n1,  Node* n2) 
5. Node Merge(Node& n1, Node& n2) 
6. Node Merge(Node&& n1, Node&& n2) 
7. Node Merge(Node n1, Node n2) 

My thoughts: Wasn't feeling particularly well after this round. Although I solved the coding problem very quickly, the unexpected language-specific questions made me very nervous. I would say I fumbled around 40 percent of the theoretical questions. I have gone over hundreds of interview experiences and never saw language-specific questions in a Google technical round. This was easily my worst round. I was hoping for a Lean Hire/Hire rating for this, only because I had solved the coding question quickly but was thinking it might be even Lean No Hire.

Result: The recruiter's call surprised me; she said the overall feedback was positive, despite a couple of concerns. Since she mentioned positive rather than mixed feedback (which is common for LH/LNH), I believe my rating was Hire. Thankfully, weightage was given to my performance in the coding question and not just the language specific questions.

Onsite Round 3:

Problems:

Q1: Design a class which will have these two methods:

AddEvent(int timestamp, int clientId) -> adds an request/event by this clientId at this timestamp
getCount()  -> this will return the number of distinct client requests in the last K seconds. K was also given upfront. 

You can assume you have a method which will give current time and you can use that in the getCount() method. 

Q2: There is a chess contest between N players. Each chess player has a distinct rank (positive integer number from 1 to N). We assume that in a chess game between two players, the higher ranked player always wins. Best player would have rank 1 and worst player would have rank N.

Rank1 => the player wins all other players. RankN => The player loses against all the players

Unfortunately, we don't know the player ranks. But we know the outcome of M games in the following format: Given the results of M games above, are there any players whose rank can be precisely determined? Return true is yes otherwise false.

Example:
N=5 M=5
The result of M games:  
Player #4 won #3 (read as player with id 4 won against player with id 3) 
Player #4 won #2
Player #3 won #2
Player #1 won #2
Player #2 won #5
Answer: True  

The rank of 2 players can be determined precisely:
player #2(rank is 4): they lost to players #1, #3, #4 and won against player #5;
player #5(rank is 5): they lost to player #2 and we know that player #2 has already lost to #1, #3, and #4.

My thoughts: Easily my best round, was able to solve both the questions but the round was anything but smooth. Throughout the round, I struggled to understand the interviewer's accent and primarily relied on what he wrote in the shared document. Thankfully, he too acknowledged the gap in communication and gave me an additional 30 minutes to complete the coding for the second question. I was expecting a Strong Hire/Hire rating for this round.

Result: The recruiter confirmed positive feedback with no concerns. The rating would have been SH.

Googlyness:

This round was taken by a very experienced Googler. Most of the questions felt standard and I was able to answer them well along with the follow up questions.

I mostly prepared from this list by a fellow leetcoder: https://leetcode.com/discuss/post/5963463/googlyness-frequently-asked-questions-by-55sh/. I prepared answers for all questions based on my experiences and used chatgpt to refine those answers. This round went smoothly, and I was expecting an H or SH.

Result: The recruiter confirmed it was a very good round for me, with positive feedback and no concerns. The rating would have been SH, and she informed me I would be moving to the team matching stage.

Team Matching Round:

A week later, a team matching round was scheduled. I researched about the team a bit, brushed up on my resume and revised my notes for Googlyness round as part of preparation for this round.

In the call, the EM mostly spoke about their team and asked a bunch of questions about their work and product. I showed genuine interest and I believe this is the most important thing in this round.

Result: Recruiter called and said it was a good match and that they will forward my packet to the Hiring Committee.

Final Result:

A week after the team matching feedback, the recruiter set up a call for compensation discussion. After a round of negotiation, I happily accepted the offer a day later!

Interview Questions (6)

Q1
Separate Squares I
Data Structures & Algorithms

Problem: https://leetcode.com/problems/separate-squares-i/description/. There was a big story around this problem but in essence it was the question I have linked above.

Q2
Run-Length Encoding and Decoding
Data Structures & Algorithms

You are working on a data sequence but the data is too big. Fortunately the data has a lot of repeated values.So you would want use the run-length encoding (RLE) compression technique.

Input: 
2, 1, 1, 2, 5, 5, 3, 3
Output (RLE would look like):
2 ->1, 1 -> 2, 2 -> 1, 5 -> 2, 3 -> 2

Write a method to do this encoding.

Follow up 1: Given the encoded list and an index, return the value that was present at that index in the original list. Follow up 2: Assume the original list was sorted. You are given the encoded list of the original list and a value. You need to return the index of the first occurrence of this value in the original list.

Q3
Problem from LeetCode Discuss Post
Data Structures & Algorithms

The interviewer joined 5 minutes late and then proceeded to type out the question instead of pasting it. This easily wasted about 20 minutes. Luckily I had solved this question before and was able to come up with the solution very quickly. There was scope for optimization but they did not ask for it.

Q4
C++ Node Merge Function Overloading/Signature Analysis
Other

Interviewer asked language (cpp) specific questions. He wrote down these method signatures and asked multiple questions around the same:

1. Node Merge(const Node& n1, const Node& n2) 
2. Node Merge(const Node n1, const Node n2) 
3. Node Merge(const Node* n1, const Node* n2) 
4. Node Merge(Node* n1,  Node* n2) 
5. Node Merge(Node& n1, Node& n2) 
6. Node Merge(Node&& n1, Node&& n2) 
7. Node Merge(Node n1, Node n2) 
Q5
Design Class for Distinct Client Events in Last K Seconds
Data Structures & Algorithms

Design a class which will have these two methods:

AddEvent(int timestamp, int clientId) -> adds an request/event by this clientId at this timestamp
getCount()  -> this will return the number of distinct client requests in the last K seconds. K was also given upfront. 

You can assume you have a method which will give current time and you can use that in the getCount() method. 
Q6
Determine Player Ranks in Chess Contest from M Games
Data Structures & Algorithms

There is a chess contest between N players. Each chess player has a distinct rank (positive integer number from 1 to N). We assume that in a chess game between two players, the higher ranked player always wins. Best player would have rank 1 and worst player would have rank N.

Rank1 => the player wins all other players. RankN => The player loses against all the players

Unfortunately, we don't know the player ranks. But we know the outcome of M games in the following format: Given the results of M games above, are there any players whose rank can be precisely determined? Return true is yes otherwise false.

Example:
N=5 M=5
The result of M games:  
Player #4 won #3 (read as player with id 4 won against player with id 3) 
Player #4 won #2
Player #3 won #2
Player #1 won #2
Player #2 won #5
Answer: True  

The rank of 2 players can be determined precisely:
player #2(rank is 4): they lost to players #1, #3, #4 and won against player #5;
player #5(rank is 5): they lost to player #2 and we know that player #2 has already lost to #1, #3, and #4.

Preparation Tips

Preparation:

I used to do leetcode in my college days. So when I started looking out for job switch, to revise all the concepts quickly I completed the Neetcode 150 list.

For google targeted preparation - I solved many problems from other Google interview experiences shared on Leetcode. When I say "I solved", I genuinely mean I implemented the running code locally for the problems which I thought had tricky implementation or had a concept which I was not too confident in. I believe this hands-on approach was one of the most important things that helped me a lot. Here's a small snapshot of my solutions folder to give you an idea:

Screenshot 2025-05-17 at 1.48.38 PM.png

Final thoughts:

The whole process took over 3 months and I learnt how to be really patient. At times, I felt like stopping Google-targeted preparation, as I had to spend significant time on LLD and system design preparation as well, which are asked in all other companies for mid-level roles. But I think my love for problem-solving kept me at it, and I made it a point to solve at least 2-3 google-kinda problems daily. Consistency and trust in the process pays off.

Thank you all for reading. Happy coding and good luck!

Google | L4 | Interview Experience
google logo
Google
SDE IIBengaluru
May 16, 20252 reads

Summary

I interviewed for an L4 position at Google in Bengaluru, successfully navigating a phone screen, three challenging onsite technical rounds, and a behavioral conversation, which ultimately led to an offer.

Full Experience

I got a call from a recruiter in Nov 24 for an L4 position in Bengaluru. Took some time to prepare and started interviewing in January.


Phone Screen: Same questions as this. Was able to explain my solution (multi source BFS), estimate TC and SC, then write code. Did the same for the follow up.


Onsite 1: Given a file_path to chat logs, and a number K, return the K most talkative users (word count) from the logs. An example of the logs can be found here.

Asked a lot of questions to understand edge cases, collision handling, etc., coz it seemed too simple. Found out i had to write the parser logic for the file. Also found out that in case of tie for the last position on top k list, we had to include all tied users in the result. Explained a heap solution, and wrote code for it. Was asked to write up different test scenarios for this problem.


Onsite 2: You are given a network of teleporters(nodes) (N - number of teleporters, edges - connections b/n teleporters). Some of them are broken. A broken teleporter/node cannot take you to another teleporter/node.

Q1: Get the shortest path from A to B avoiding broken teleporters (expected output is list of nodes in travel sequence). If no path exists, return an empty list. I used BFS for this.

Q2: Suppose the the broken teleporters are partially fixed. Travelling from a working teleporter is instantaneous. But teleporting from a fixed/partially working teleporter takes 1 day's time. Get the shortest path from A to B while minimizing use of partially fixed teleporters.

My first instinct was to use BFS with priority queue (Djikstra's). But interviewer mentioned there is a better approach. I realized the answer was a 0-1 BFS, and implelmented that.


Onsite 3: Beautiful Path: You're given a footpath of n blocks, each painted with one of k colors. Guests walk along the path, and each has a favorite color c. The beauty of the path for a guest is the length of the longest contiguous footpath segment painted in their favorite color.

Q1: Find the longest continuous streak of color c.

Used a simple iteration to solve this.

Q2: Suppose we have many guests now, each with their own fav color. For each guest, return the max beauty based on their favorite color.

Used one map to track the maxBeauty for each guest. As we iterate over the blockColors, we keep track of curColor and curStreak for curColor. If the color is not curColor, we reset curColor and curStreak. If the color is curColor, we update curStreak. At each step, we check and store maxStreak for curColor.

Q3: Let's go back to having 1 guest. Suppose you could repaint m blocks to any color. Find the max beauty value if we could repainit m blocks.

Used a sliding window approach, with the window limited by having not more than m non fav color blocks.

Follow ups were likely to continue until we ran out of time.


Behavioural Round: It was more of a conversation, so I don't remember the exact questions. But the conversations was fun and interactive.


Verdict: Cleared all DSA rounds. My recruiter didnt share ratings for any interviews.

Offer: https://leetcode.com/discuss/post/6749999/google-l4-bengaluru-by-anonymous_user-deyh/

This was my 3rd interview with Google.

Interview Questions (6)

Q1
K Most Talkative Users from Chat Logs
Data Structures & Algorithms

Given a file_path to chat logs, and a number K, return the K most talkative users (word count) from the logs. An example of the logs can be found here. Asked a lot of questions to understand edge cases, collision handling, etc., coz it seemed too simple. Found out i had to write the parser logic for the file. Also found out that in case of tie for the last position on top k list, we had to include all tied users in the result.

Q2
Shortest Path in Teleporter Network (Avoiding Broken)
Data Structures & Algorithms

You are given a network of teleporters(nodes) (N - number of teleporters, edges - connections b/n teleporters). Some of them are broken. A broken teleporter/node cannot take you to another teleporter/node. Get the shortest path from A to B avoiding broken teleporters (expected output is list of nodes in travel sequence). If no path exists, return an empty list.

Q3
Shortest Path in Partially Fixed Teleporter Network
Data Structures & Algorithms

Suppose the the broken teleporters are partially fixed. Travelling from a working teleporter is instantaneous. But teleporting from a fixed/partially working teleporter takes 1 day's time. Get the shortest path from A to B while minimizing use of partially fixed teleporters.

Q4
Longest Continuous Streak of a Favorite Color
Data Structures & Algorithms

You're given a footpath of n blocks, each painted with one of k colors. Guests walk along the path, and each has a favorite color c. The beauty of the path for a guest is the length of the longest contiguous footpath segment painted in their favorite color. Find the longest continuous streak of color c.

Q5
Max Beauty for Multiple Guests with Favorite Colors
Data Structures & Algorithms

Suppose we have many guests now, each with their own fav color. For each guest, return the max beauty based on their favorite color.

Q6
Max Beauty with M Repaints for One Guest
Data Structures & Algorithms

Let's go back to having 1 guest. Suppose you could repaint m blocks to any color. Find the max beauty value if we could repainit m blocks.

Preparation Tips

My DSA prep => Neetcode 150 + problmes from Google Interview Experiences from Leetcode (Google has a lot of repeated questions).

What I have realized so far is that your code is just half of what interviewers are looking for. Here's the rest:

  1. Ask questions. You are an engineer. You are expected to ask relevant questions and get the full picture. Never expect the given problem to be the full problem.
  2. Specify all the scenarios/edge cases that you are considering while building the solution.
  3. Explain your thought process while building/explaining the solution, like, why you think this is a sliding window/graph/binary search/whatever problem, what the algo are you planning to use, why did you chose BFS over DFS, etc. Justify the solutions/trade-offs/ decisions you make.
  4. Be verbal while coding, like, I am using a map here to save/track the maxBeautyValue for each guest, I am using this FOR loop to build my adjacency list, etc.
  5. Use clean and relevant variable names.
  6. Calculate TC and SC for your solution. They may ask this before you start coding as well.

The main point here is, BE COMMUNICATIVE. DO NOT TAKE LONG PAUSES. If you don't know the solution immediately, just communicate what angle you are looking at the problem from. If you realise that prespective was wrong, communicate that. The interviewer will give hints if you are taking too long, which is fine, but try not to take more than 1 hint, as that can push you towards a Lean Hire or worse.

Final TIP: Ask good/personal questions to all interviews at the end of the interview. This is your last chance to make a good impression on your interviewer. Don't ask generic questions like "What is your tech stack?". So prepare a list of questions that force the interviewer to put in some effort to answer (more likely to remember you/leave a good impression), something that they may enjoy answering, and is personal to their experience. Ex:, why did you choose to work at your current team? what has been the best day at Google for you? can you tell me about an incident that made you shine at work, like a really good work memory? What has been your most important learning from working at Google? How has your perception of google shifted from before joining vs now?

Google L3 | Interview Experience
google logo
Google
SDE I
May 16, 20252 reads

Summary

I completed my onsite interview for an L3 role at Google and am sharing the questions, though I am unsure about the outcome and believe I may need to look for other opportunities.

Full Experience

I have completed my Onsite Interview, I dont know what will be the result but lets share the questions with the community.

Round 1: Backtracking - Number of ways to generate pattern passwords in a phone. Went pretty good.

Round 2: Queue: Minimum end time for all the tasks given that each will take fixed amount to get executed and given fixed number of CPUs. Follow up was to find the minimum CPUs, I gave a NLogN approach but they wanted linear, times up. Everything was good except follow up complexity

Round 3: Googlyness: very good discussions.

Round 4: From all the subarrays, return the kth smallest subarray sum . Array can be having negative numbers too. Only was able to provide brute force approach.

I think its time to look for other opportunities :(

Interview Questions (3)

Q1
Generate Pattern Passwords on Phone
Data Structures & Algorithms

Number of ways to generate pattern passwords on a phone.

Q2
Minimum End Time for Tasks with Fixed CPUs
Data Structures & Algorithms

Minimum end time for all the tasks given that each will take fixed amount to get executed and given fixed number of CPUs. Follow up was to find the minimum CPUs.

Q3
Kth Smallest Subarray Sum
Data Structures & Algorithms

From all the subarrays, return the kth smallest subarray sum. The array can have negative numbers too.

Google L5 Reject -- Bengaluru -- Ph.D.
google logo
Google
MLOps Engineer (L5)Bengaluru
May 16, 20254 reads

Summary

I had an interview experience at Google Bengaluru for an MLOps L5 role. The process involved a telephonic screen and four on-site rounds covering data structures, algorithms, and system design, concluding with a reject.

Full Experience

Hello Everyone.

I am sharing my interview experience at Google Bengaluru. Distributed learning team (Berlin HQ), MLOps role. I was contacted by a recruiter in the month of February.

Telephonic Interview

Nice and humble interviwerer. I got stuck at one point, where she pointed out an errornous assumption I was making.

Question.

Given two strings $s_1$ and $s_2$, where $len(s_1) >> len(s_2)$, find the minimal substring $s_k$ in $s_1$ such that $s_2$ can be constructed by picking letters from $s_k$ one or more times. Return the first and (last - 1) index of the string $s_k$ in $s_1$.

How I solved.

String Manipulation -> substring window
DP Approach -> 
Suffix Tries -> Largest suffix to ignore.

Verdict

Hire

Round-1 Interview

Question.

Given an array of numbers, where $i \leq a[i] \leq i^2$, find the largest subarray with sum, $s$ such that $s \neq n \bigwedge s < n^2$ where, $n$ is the size of the array.

How I solved.

Verdict

Strong Hire

Round-2 Interview

Question.

Similar to House Robber - III.

How I solved.

Verdict

Strong Hire

Round-3 Interview

Question.

LRU Cache implementation with a tweak.

How I solved.

Verdict

Lean

Round-4 Interview

Interviewer was in a hurry. Gave vague constraints. He asked my what was the motivation to do a Ph.D. in computer science?

Question.

Given a matrix of size $n \times m$, Find the largest submatrix of size $i \times j$ such that the sum over rows equals sum over columns and the total sum is less that $n + m$.

How I solved.

2D Array + DP
Direction vectors

Verdict

Reject

Interview Questions (6)

Q1
Minimal Substring to Construct Word
Data Structures & AlgorithmsHard

Given two strings $s_1$ and $s_2$, where $len(s_1) >> len(s_2)$, find the minimal substring $s_k$ in $s_1$ such that $s_2$ can be constructed by picking letters from $s_k$ one or more times. Return the first and (last - 1) index of the string $s_k$ in $s_1$.

Q2
Largest Subarray Sum with Specific Constraints
Data Structures & AlgorithmsMedium

Given an array of numbers, where $i \leq a[i] \leq i^2$, find the largest subarray with sum, $s$ such that $s \neq n \bigwedge s < n^2$ where, $n$ is the size of the array.

Q3
House Robber III
Data Structures & AlgorithmsMedium

Similar to House Robber - III.

Q4
LRU Cache Implementation with Tweak
Data Structures & AlgorithmsMedium

LRU Cache implementation with a tweak.

Q5
Motivation for Ph.D. in Computer Science
Behavioral

He asked my what was the motivation to do a Ph.D. in computer science?

Q6
Largest Submatrix with Equal Row/Column Sums and Total Sum Constraint
Data Structures & Algorithms

Given a matrix of size $n \times m$, Find the largest submatrix of size $i \times j$ such that the sum over rows equals sum over columns and the total sum is less that $n + m$.

Google L4 phone screen interview
google logo
Google
4 years
May 15, 20253 reads

Summary

I had a phone screen interview for Google L4, where I was asked a game theory problem involving card picking. Despite the problem being standard, I fumbled and do not expect to proceed to further rounds.

Full Experience

Education: B.Tech
YOE: ~4

Interviewer asked this question:
A game theory question, where you are playing against another player and each player take turn picking one card or two cards, the cards can have negative or positive score. After the game has ended we need to take the difference of your score and the other players score. What is the maximum difference possible

IMO, pretty standard question but fumbled so hard, so definitely there wont be other rounds for me.

Interview Questions (1)

Q1
Maximize Difference in Card Game Score
Data Structures & Algorithms

A game theory question, where you are playing against another player and each player take turn picking one card or two cards, the cards can have negative or positive score. After the game has ended we need to take the difference of your score and the other players score. What is the maximum difference possible

Google SWE III ML - L4 interview experience - May - 2025
google logo
Google
SWE III ML - L44 years
May 14, 20255 reads

Summary

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

Full Experience

Background -

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

TPS -

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

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

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

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

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

Interviewer feedback -
Positive. Moved to onsites.

Onsite R1 -

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

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

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

Onsite R2 -

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

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

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

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

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

Onsite R3 -

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

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

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

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

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

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

Onsite R4 - Googliness

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

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

Overall feedback is positive. Moved to team match.

Interview Questions (9)

Q1
Dice Game Win Count
Data Structures & AlgorithmsMedium

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

Q2
Minimum Hand Raises on Piano
Data Structures & AlgorithmsMedium

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

Q3
File System Total Space Consumption
System DesignMedium

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

Q4
Top K Most Frequent Words
Data Structures & AlgorithmsMedium

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

Q5
Prefix Search in Dictionary
Data Structures & AlgorithmsMedium

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

Q6
Tell Me About Yourself
Behavioral

Tell me about yourself.

Q7
Conflict Resolution with Peer
Behavioral

Conflict resolution with peer.

Q8
Positive Impact on Team
Behavioral

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

Q9
Going Above and Beyond for User
Behavioral

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

Google New Grad Interview Experience 2025 - India
google logo
Google
New GradIndia
May 14, 20253 reads

Summary

I completed six technical interview rounds for a New Grad position at Google India, performing well on most questions but still awaiting a final decision due to staggered hiring for the 2025 batch.

Full Experience

Google Interview Questions:

Recruiter’s Email: October 19, 2024

  • Interview 1 (November 6, 2024):
Obtain the inorder predecessor and successor in a binary search tree. Follow up: without using extra memory

Self-evaluation: Hire

Took some time to modify the binary tree for parent pointers, hence not a strong hire, but did successfully code both question and follow-up within 35 minutes.

  • Interview 2 (November 29, 2024, interviewer didn’t show up, rescheduled to December 6, 2024):
Given an array, return the largest subarray that is a special arithmetic sequence.

Self-evaluation: Hire

Managed to code the solution using a two-pointer approach in around 45 minutes.

  • Interview 3 (January 15, 2025):
A graph-based question. Alice and Bob are two friends in two cities. They want to go to a destination city, and they are open to cab sharing after meeting in a common city. Return the minimum cost of their travel.

Self-evaluation: Strong Hire

Used multi-source BFS with hashmaps for optimisation. Interviewer was positive and impressed. G&L round here also went very well, it was a light-hearted and fun discussion.

  • Interview 4 (January 15, 2025):
We have been given a file with IP Addresses and their respective locations. We have also been given a query IP address, for which we need to obtain the location. Return the city to which the IP belongs. Follow up: instead of a single query, there are multiple queries in an array.

Self-evaluation: Lean No Hire

Took a bad turn into tries when followed up with multiple queries. Did code the optimal binary search approach, but was a little tensed, hence made small mistakes that I corrected under the time limit without any hints from the interviewer. The interviewer was a bit non-communicative, so the G&L round felt like a quiz with pre-meditated questions.

Additional rounds:

  • Interview 5 (February 19, 2025):
We have been given a file that has chat logs between people. We need to obtain the top n talkative users, where the most talkative user is the user with the highest count of words. Follow up was given by amending the file structure.

Self-evaluation: Strong Hire

Coded the entire solution using heap within 30 minutes. Initial code was dynamic in nature so the follow-up was already addressed in my solution. Interviewer was impressed, hence had an informal and friendly discussion for the remaining 15 minutes.

  • Interview 6 (February 19, 2025):
We have been given two arrays of two classes - Apartments (flat_number, no_of_bedrooms) and People(name, preference). There are people who prefer a single bedroom apartment (preference = False), and there are people who prefer having housemates : multiple bedroom apartments (preference = True). We need to prioritise preference of the people, but ensure that as many people are housed as possible.

Self-evaluation: Strong Hire 

Coded the initial solution in 35 minutes using heaps, interviewer was impressed with the code quality and clarity. Told me to expect a positive response from the recruiter soon.

Situation today: They have told me to wait for a decision. The overall interview feedback is good, but apparently the hiring decisions for the 2025 batch are currently staggerred so it might take them till mid-June to deliver a concrete response.

Interview Questions (6)

Q1
Inorder Predecessor and Successor in BST
Data Structures & AlgorithmsMedium

Obtain the inorder predecessor and successor in a binary search tree. Follow up: without using extra memory

Q2
Largest Special Arithmetic Subarray
Data Structures & AlgorithmsMedium

Given an array, return the largest subarray that is a special arithmetic sequence.

Q3
Minimum Cost Cab Sharing Travel
Data Structures & AlgorithmsHard

A graph-based question. Alice and Bob are two friends in two cities. They want to go to a destination city, and they are open to cab sharing after meeting in a common city. Return the minimum cost of their travel.

Q4
IP Address Location Lookup
Data Structures & AlgorithmsMedium

We have been given a file with IP Addresses and their respective locations. We have also been given a query IP address, for which we need to obtain the location. Return the city to which the IP belongs. Follow up: instead of a single query, there are multiple queries in an array.

Q5
Top N Talkative Users from Chat Logs
Data Structures & AlgorithmsMedium

We have been given a file that has chat logs between people. We need to obtain the top n talkative users, where the most talkative user is the user with the highest count of words. Follow up was given by amending the file structure.

Q6
Apartment Allocation with Preferences
Data Structures & AlgorithmsMedium

We have been given two arrays of two classes - Apartments (flat_number, no_of_bedrooms) and People(name, preference). There are people who prefer a single bedroom apartment (preference = False), and there are people who prefer having housemates : multiple bedroom apartments (preference = True). We need to prioritise preference of the people, but ensure that as many people are housed as possible.

Google TPS L3 India | Cleared, Hiring freeze
google logo
Google
TPS L3India
May 14, 20255 reads

Summary

I interviewed for a TPS L3 role at Google in India and successfully cleared the round, though a company-wide hiring freeze means the onsite interviews are currently delayed by a month or two.

Full Experience

Google TPS 13th May, Night interview, Loc - India, Interviewer - USA. The question was from previous year discussions (thanks to @leethard) and had been asked multiple times recently. I would have struggled if I hadn't solved it previously, as the actual question pasted by the interviewer was two paragraphs long with a big test case, making it difficult to understand. However, having solved it multiple times, I easily identified it and didn't panic. The interview was over in 32 minutes. The question given was very lengthy to read. EDIT: My recruiter just called to inform me that I cleared the TPS round but there's a hiring freeze, so onsites might take a month or two.

Interview Questions (1)

Q1
Minimum Sum of Distances to a Meeting Node (3x 0/1 BFS)
Data Structures & AlgorithmsHard

The problem involved finding a meeting node 'm' that minimizes the sum of distances from three given cities (A, B, C) to 'm': dist(A,M) + dist(B,M) + dist(C,M). The interviewer presented a lengthy, two-paragraph problem statement with a large test case. An almost equivalent problem is LeetCode's 'Minimum Weighted Subgraph With the Required Paths'.

Preparation Tips

I made a list of approximately 150 frequently repeated Google-specific questions with solutions by analyzing LeetCode discussions from 2023-2025.

Disgusting Google L4 Screening Round
google logo
Google
Software Engineer L4 Screening
May 13, 20255 reads

Summary

I had a frustrating Google L4 screening interview marked by poor communication, an ambiguous problem, and conflicting explanations regarding parallel execution. This led to confusion and inefficient solutions, ultimately resulting in a 'No Hire' verdict citing poor problem-solving.

Full Experience

TL;DR: Had a Google screening interview with a non-native English-speaking interviewer, which was marked by poor communication, ambiguous code snippets, and conflicting explanations—especially around blocking behavior in parallel execution. The unclear problem statement led to confusion and inefficient solutions. Ultimately received a 'No Hire' with feedback citing poor problem-solving. Frustrated by the 1-year cool-off and the lack of clarity in early-stage interviews

Date: 9th May 2025

The interviewer was a German guy. Started with an intro. He began reading some code snippet. It was difficult to understand orally. I could not see the code in the Google Meet video or on the interview doc. I waited for 2 minutes to see if he would stop or say something—still, he was just reading. Then I said I was unable to see the code. He said it was present in the interview doc. I said that it was not visible to me. Then he checked again and tried a few more times. Finally, it was visible on the doc.

He gave the following code snippet:

public CWFuture CountWords (int machine_id, int doc_id);

class CWFuture {

    int Join();

    boolean IsDone();

}

I was confused after looking at the snippet itself. First of all, it was syntactically incorrect. Also, the method names started with capital letters, which was weird. The first two lines were especially confusing for me.

He told me we have a list of documents, each document has multiple words. We have an infinite set of machines. The CountWords method runs on a particular machine_id and tells us how many words are present in a document with a particular doc_id. We have to find the sum of all the words in all the documents.

Then he explained the other two methods:

Join => Blocks until the operation has completed and a result is available, and returns the result.

IsDone => Returns whether or not the operation has completed.

He then created another method:

int CountWords() {}

He created it inside the CWFuture class and asked me to code it. (I think this itself was wrong—it should have been created in a new class.)

He was not fluent in English and was speaking at a very slow pace. Even to understand up to this point, I had to ask multiple clarifying questions. Then finally, he added these comments for the methods at the end of the document. And once I said "got it", he removed them—which seemed weird to me.

First of all, the code at this point was very ambiguous. I was not even sure how to call the CountWords method itself. I tried asking some questions, but I still didn't understand. So I asked him again. He gave the following code:

CWFuture* cw_future = CountWords(machine_id, doc_id);

It was beyond my understanding how a method which is not present in a class was being called directly. I was feeling awkward and dumb at the same time. But I didn’t object and proceeded.

Then I asked him, blocking basically means that the machine will be blocked, right? He said yes. I said, the machine_id on which this method is running, right? He again said yes. Just to confirm, I asked whether our system (which calls the API) will also get blocked? He said yes.

I was shocked. So I asked another question: It means that we cannot do anything on our system at that time? He again said yes.

Then I said that since our machine is blocked, we cannot run multiple CountWords on multiple machines—as once the method is called on a system, our machine will also get blocked. He said yes. So, I said I will run it serially on each machine. He said to code it. At this point, I was expecting there would be a follow-up where our machine is not blocked.

I coded it in around 5 minutes. After coding, he said "why don't you try this" and gave a code snippet. He was basically trying to run it in parallel. I said, as you already mentioned our machine is blocked, it will run serially only. He said, what will be the total time? I said: number of machines * average time for each machine. He said: should it not be max of time taken on any machine? I again said, that is possible if our system is not blocked.

I assume he didn't understand my explanation. It was only after I wrote the code that he realized I was calling countwords serially.

He then asked me to code the logic suggested by him. I made the changes—it took 5 minutes. I was confused how to check if all APIs have completed. I thought a bit and then used a while loop with a queue. All the APIs which are not done are put into the queue, and then checked again. If not done, they're put back into the queue. Not sure if this was a good way.

At this time, I was already just waiting for the interview to be over.

He asked me to explain the code. I did. He said, please look at your code and see if there is any mistake. I observed for some time—everything looked fine. I said, yes, looks good. He pointed out a mistake, which was valid. I corrected it.

Finally, he ended the interview—maybe 2–3 minutes were remaining. He asked if I had any questions. At that point, he was smirking while looking at me, which I found extremely unprofessional.

Verdict: No Hire Comments: Lacks problem solving. Was not able to understand the problem properly.

I am not sure why such people are allowed to take interviews. Even if they do, they should not ask such ambiguous problems when they can’t even explain them. He spoke bare minimum, was unsupportive and allowed me to code a wrong (inefficient) logic only to correct it once I had completed coding it. I was further dejected when I learnt that the cool-off period is 1 year even if you get rejected in the screening round.

Interview Questions (1)

Q1
Asynchronous Word Count Sum from Documents
Data Structures & AlgorithmsHard

Given an API signature: public CWFuture CountWords (int machine_id, int doc_id); and a CWFuture class with int Join(); and boolean IsDone(); methods. The CountWords method runs on a specified machine_id and returns the word count for a doc_id. Join() blocks until the operation completes and returns the result. IsDone() returns true if the operation has completed.

The task is to find the sum of all words in all documents from a given list of documents, utilizing an infinite set of machines.

Initially, I was given misleading information that calling CountWords would block the caller's system, which implied a serial execution approach. The core challenge then shifted to implementing a parallel solution where the calling system is not blocked, aiming for an overall time complexity proportional to the maximum time taken by any single machine rather than the sum of times across all machines.

Google Onsite 2
google logo
Google
May 13, 20254 reads

Summary

I bombed my Google onsite interview due to nervousness, struggling with a hashmap problem involving time-based entry removal.

Full Experience

Bombed it :( Was too nervous. Is was a simple hashmap question where I was supposed to remove the entries if a certain time has passed. I started thinking of using heap :( Very embarassing

Interview Questions (1)

Q1
Hashmap with Time-Based Entry Removal
Data Structures & Algorithms

A simple hashmap question where I was supposed to remove the entries if a certain time has passed.

Google | Bengaluru | SDE 3 | Reject
google logo
Google
SDE 3Bengaluru3.5 yearsRejected
May 12, 202561 reads

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)

Q1
Coin Toss Jump to N
Data Structures & Algorithms

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.

Q2
Necklace Division with Diamonds and Rubies
Data Structures & Algorithms

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.

Q3
Secure Singly Linked List Implementation
Data Structures & Algorithms

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.

Q4
Manager's Unreasonable Demands & Product Release
Behavioral

Describe a situation where your manager had unreasonable demands. How did the product release go through? What were the learnings?

Q5
Project with Business Impact
Behavioral

Describe a project where you had a lot of business impact?

Q6
Minimum Teleportations in Defective Space Stations
Data Structures & Algorithms

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.

Google | L4 Bangalore | Reject
google logo
Google
SDE IIBangalore
May 11, 20253 reads

Summary

I interviewed for an L4 role at Google in Bangalore. After passing the screening and three coding rounds, and a behavioral round, I was ultimately rejected due to feedback on coding speed and edge case handling.

Full Experience

Recruiter reached out on LinkedIn. This was my first crack at Google. So after the initial call with the recruiter and applying on the portal, they arranged for a mock interview since this was my first time interviewing with Google.

Screening round
Interviewer was from Munich. Very nice and personable.

In a matrix that contains zeros, there might exist a square matrix of ones. If it does then that is the only square matrix of ones, there are not others. Find the size of the square matrix and the position of the top left corner.

It was different type of question compared to the standard DSA questions. We discussed the approach , time complexity , ways to improve it and choice of output data structures.

Verdict: Pass

Round 1
It was with an Indian interviewer who seemed least interested in the interview.

The question was given 3 numbers and a target , find the expression string that evaluates to the target using only +, * and () .

(2 + 3) * 4 = 20
The numbers had to be in order and order can't be changed.

First he asked how many different combination are possible , then I provided a backtracking approach. He seemed fine.
While implementing it , it seemed a little too tricky to implement it.
Since he mentioned there are only 3 numbers, I suggested a brute force approach with with all the six combinations.

He seemed fine with it and I implemented it

I was not satisfied with this round , the question seemed odd.


Round 2
Given a fence with different heights and width of 1 meter. Also given a brush with width 1 meter. I can colour the fence either horizontally and vertically with the brush in one stroke. Return the minimum amount of strokes needed to paint the fence
input = 1 2 2 1 2
minimum strokes = 3
I implemented an Optimal solution using a divide and conquer algorithm
This round went well without any hiccups

Round 3
Given a stream of inputs in a messaging system like
{"A", "C", "Message 1"}
{"A", "B", "Message 1"}
{"C", "A", "Message 1"}
Implement the following methods,
registerEvent(user1, user2, content)
getFrequent() -> returns any user who has been mentioned maximum number of times across all threads. Multiple communication with the same individual are counted as one
Follow up
Find the top k user
I mentioned both heap based approach and quickselect
Told me to implement the heap based approach. The interviewer was satisfied

Round 4
Standard behavioural rounds. This round was easy


Final Outcome
The recruiter called after a few days and said it was a great attempt but not moving forward with my application at this point. Did not provide round specific feedback. Just said I need to improve coding speed and edge case handling.

Interview Questions (4)

Q1
Find Unique Square Matrix of Ones
Data Structures & AlgorithmsMedium

In a matrix that contains zeros, there might exist a square matrix of ones. If it does then that is the only square matrix of ones, there are not others. Find the size of the square matrix and the position of the top left corner.

Q2
Expression Evaluation with Three Numbers
Data Structures & AlgorithmsMedium

Given 3 numbers and a target , find the expression string that evaluates to the target using only +, * and () .

(2 + 3) * 4 = 20
The numbers had to be in order and order can't be changed.

Q3
Minimum Strokes to Paint Fence
Data Structures & AlgorithmsHard

Given a fence with different heights and width of 1 meter. Also given a brush with width 1 meter. I can colour the fence either horizontally and vertically with the brush in one stroke. Return the minimum amount of strokes needed to paint the fence

input = 1 2 2 1 2
minimum strokes = 3

Q4
Messaging System User Frequency
Data Structures & AlgorithmsMedium

Given a stream of inputs in a messaging system like

{"A", "C", "Message 1"}
{"A", "B", "Message 1"}
{"C", "A", "Message 1"}
Implement the following methods,
registerEvent(user1, user2, content)
getFrequent() -> returns any user who has been mentioned maximum number of times across all threads. Multiple communication with the same individual are counted as one
Follow up
Find the top k user

Google | L4 | Phone Screen | Horrible Experience
google logo
Google
SDE IIIndia
May 7, 20255 reads

Summary

I experienced a challenging phone screen at Google India for an L4 role where the interviewer was uncooperative, providing minimal information for a difficult problem, which I eventually solved within the given time constraints.

Full Experience

Hey folks,

Today I appeared for phone screen round at Google India for L4 role.

Interviewer was not at all cooperative. He pasted the 2 lines of problem and thats it.

The problem statement was something like:

“Google has started it’s shuttle service, you have given shuttle departure time, capacity of shuttles ( fixed across all shuttles ) , and arrival time of the passengers. What’s the maximum late time you can arrive and still catch the shuttle.”

No testcase provided, upon asking the testcase he shared one testcase that has only input!

No output provided!! I asked for sample output, he said that you have to find out on your own ( Bruh I didn’t even understand the problem yet )

It took me 20-25 to understand the problem and figuring out the output of testcase 1 after some to and from.

Then in last 20 minutes, i was able to solve the problem.

He pointed out some edge case and I fixed it on the go within minute.

I took whole 45 minutes of the time to solve the problem, my recruiter from very start said try to solve the problem within 30 minutes and without any hints and all.

Found the same problem on leetcode after the round : https://leetcode.com/problems/the-latest-time-to-catch-a-bus/description/

~400 likes & ~800 dislikes !!! 28% Acceptance Rate, fellow leetcoders are cursing this problem in discuss & comments section.

Interview Questions (1)

Q1
Latest Time to Catch a Shuttle Bus
Data Structures & AlgorithmsHard

Google has started it’s shuttle service, you have given shuttle departure time, capacity of shuttles ( fixed across all shuttles ) , and arrival time of the passengers. What’s the maximum late time you can arrive and still catch the shuttle.

Google Phone screening round
google logo
Google
May 7, 20253 reads

Summary

I had a phone screening round with Google, where I was presented with a unique data structures and algorithms question regarding binary search in an unsorted array.

Full Experience

Given an unsorted array, find out the numbers that are always findable if we apply binary search. Also instead of middle function, we are given f(l,r) which can return any index which lies in a range.

Input : 2,1,3,5,0,6 Output he told me to come up with. So I am not sure what is the correct answer

Interview Questions (1)

Q1
Binary Search in Unsorted Array with Custom Midpoint Function
Data Structures & Algorithms

Given an unsorted array, find out the numbers that are always findable if we apply binary search. Also instead of middle function, we are given f(l,r) which can return any index which lies in a range.

Input : 2,1,3,5,0,6

Google (India) | L4 | 4YOE | Rejected
google logo
Google
SDE IIIndia4 years
May 6, 20253 reads

Summary

I interviewed at Google India for an L4 role, completing 5 rounds including a phone screen, three technical rounds, and a Googlyness round. Despite feeling that most rounds went well, particularly my solutions for the first and third technical questions, I was ultimately rejected after two weeks. I plan to reattempt after the cooldown period.

Full Experience

A recruiter reached out to me somewhere in December '24 and we talked about moving further to talk about the interview process. But it wasn't until March '25 when we had that "next" call.

I was briefed about the interview process that there will be 5 rounds. 1 Phone Screen (elimination) and 3 technical rounds + 1 Googlyness rounds. The technical and Googlyness rounds had a cumulative feedback.

Note: I asked for a interview time after 7PM IST so all of my interviewers were based in the US timezone.

Round 0 (Phone screen):

I was asked to design an content server and had to implement 2 APIs:

  • getContent()
  • addContent(contentContent, contentScore)

getContent() should return content and reduce its score by 1. Also, we cannot return back the same content twice.

The statement was pretty vague so I had to do some back and forth to gather the requirement and build upon it, but I was able to do so and the interviewer seemed satisfied.

A week later, I received a callback that I have cleared the Phone screen round and another recruiter will be reaching out to me (this took another 15-20 days).

Round 1 (Technical round 1):

A matrix was given which represented an ocean with cells having values as 0 and 1, 0 indicating that it's water and 1 indicating that it's a land or a part of some island.

If a cell (or a group of cells) having a 0 value was surrounded by a land cell (1) on all sides, then it was considered a fresh water lake.

The input was the coordinates of a land cell and I had to tell the number of fresh water lakes that island had.

For example, consider the following matrix:

   0 1 2 3 4 5 6 7 8 9
0 [0 0 0 0 0 1 0 0 0 0]
1 [0 0 1 0 0 0 1 1 1 0]
2 [0 1 0 1 0 0 1 0 0 1]
3 [0 0 1 0 0 0 1 1 1 0]
4 [0 0 0 0 0 0 1 0 1 0]
5 [0 0 0 0 0 0 1 1 1 0]

Let's say the input is given as {1, 2}, then the island has only 1 lake. But if the input is {2, 7} then the island has two lakes i.e. one with the cells {2, 7} + {2, 8} and another with the cell {4, 7}. Note that I asked the interviewer and then got to know that the land cells can be connected in 8 directions (up, up-right, right, right-down, down, down-left, left, left-up) but the water cells are only connected in four directions (up, right, down, left) - that is the reason why cell {1, 9} is not connected to the lake and why cell {0,5} is connected to the island.

I tried building upon a solution initially using brute force and failed but I soon implemented a solution quickly:

  1. Preprocess the matrix and mark all the ocean cells using multi source BFS or DFS - this will leave out the fresh water lake cells as it is.
  2. Start a BFS from the given island cell and every time we hit a fresh water cell, start another BFS for that cell to ensure we've covered the complete lake.
    1. The number of times we run BFS for the fresh water cell is going to be the answer as it will be equal to the number of lakes in that island.

The interviewer said that this is not the most optimal solution but it's acceptable. I am probably a little confused as I do not think there can be a better solution than this - I tried searching for this but couldn't find anything better. Anyway, moving onto next round.

Round 2 (Technical round 2):

I was given a log file sorted by time and every log line contains a marathon runner and a checkpoint they have reached. I had to return the order of checkpoints as they can appear. It was also given that a runner can choose to stop or not stop at a particular checkpoint.

The question was just the above part and I came to a agreement with my interviewer that after some processing I can assume a pair of runner ID and a checkpoint tag for each line. For example:

{1, b}
{2, c}
{1, c}
{2, a}
{1, f}

Using the above information, I deduced that each runner will reach their checkpoints in order anyway. So I concluded:

1 --> {b, c, f}
2 --> {c, a}

After this, I flunked and gave only the brute force solution of finding each checkpoint's position but 2 days after the interview I realised that all that was left for me to do was implement topological sort here to get the final answer as b, c, f, a or b, c, a, f.

Note that if we have contention between two checkpoints or their order is not clear from the given information, we can assume them in any order. See above example for reference with a and f.

Round 3 (Technical round 3):

I was expecting this to be a DSA round but this turned out to be more like a design round.

I had to design a library which can check whether a given function (which only takes in boolean parameter(s)) is a good or bad function. There was a condition given according to which we had to evaluate if it was good or bad.

For completeness, I would mention that the given condition was such that the if the function evaluates to true for either a positive or negative value of the passed parameter, then it is a good function.

We discussed the tradeoffs and my choices why I went for a certain way and implemented feedback whenever the interviewer tried to point out any.

Round 4 (Googlyness):

I think most of the questions I got are mentioned in this post by a fellow Leetcoder: https://leetcode.com/discuss/post/5963463/googlyness-frequently-asked-questions-by-55sh/

Verdict: Rejected

I got the rejection after 2 weeks. And this is the most confusing part for me as according to me most of the things went good apart from the second technical round. I asked my recruiter about the feedback and what got me rejected or which round went wrong but I was only told that "the feedback was not good".

So anyway, I have accepted this and will attempt after the cooldown period again xD

Interview Questions (5)

Q1
Content Server Design with getContent() and addContent()
System Design

I was asked to design an content server and had to implement 2 APIs: getContent() and addContent(contentContent, contentScore). getContent() should return content and reduce its score by 1. Also, we cannot return back the same content twice. The statement was pretty vague so I had to do some back and forth to gather the requirement and build upon it, but I was able to do so and the interviewer seemed satisfied.

Q2
Count Fresh Water Lakes in an Island
Data Structures & Algorithms

A matrix was given which represented an ocean with cells having values as 0 and 1, 0 indicating that it's water and 1 indicating that it's a land or a part of some island. If a cell (or a group of cells) having a 0 value was surrounded by a land cell (1) on all sides, then it was considered a fresh water lake. The input was the coordinates of a land cell and I had to tell the number of fresh water lakes that island had. For example, consider the following matrix:

   0 1 2 3 4 5 6 7 8 9
0 [0 0 0 0 0 1 0 0 0 0]
1 [0 0 1 0 0 0 1 1 1 0]
2 [0 1 0 1 0 0 1 0 0 1]
3 [0 0 1 0 0 0 1 1 1 0]
4 [0 0 0 0 0 0 1 0 1 0]
5 [0 0 0 0 0 0 1 1 1 0]

Let's say the input is given as {1, 2}, then the island has only 1 lake. But if the input is {2, 7} then the island has two lakes i.e. one with the cells {2, 7} + {2, 8} and another with the cell {4, 7}. Note that I asked the interviewer and then got to know that the land cells can be connected in 8 directions (up, up-right, right, right-down, down, down-left, left, left-up) but the water cells are only connected in four directions (up, right, down, left) - that is the reason why cell {1, 9} is not connected to the lake and why cell {0,5} is connected to the island.

Q3
Order Checkpoints from Marathon Runner Logs
Data Structures & Algorithms

I was given a log file sorted by time and every log line contains a marathon runner and a checkpoint they have reached. I had to return the order of checkpoints as they can appear. It was also given that a runner can choose to stop or not stop at a particular checkpoint. The question was just the above part and I came to a agreement with my interviewer that after some processing I can assume a pair of runner ID and a checkpoint tag for each line. For example:

{1, b}
{2, c}
{1, c}
{2, a}
{1, f}

Using the above information, I deduced that each runner will reach their checkpoints in order anyway. So I concluded:

1 --> {b, c, f}
2 --> {c, a}

Note that if we have contention between two checkpoints or their order is not clear from the given information, we can assume them in any order. See above example for reference with a and f.

Q4
Design Library to Check 'Good' or 'Bad' Function
System Design

I had to design a library which can check whether a given function (which only takes in boolean parameter(s)) is a good or bad function. There was a condition given according to which we had to evaluate if it was good or bad. For completeness, I would mention that the given condition was such that the if the function evaluates to true for either a positive or negative value of the passed parameter, then it is a good function. We discussed the tradeoffs and my choices why I went for a certain way and implemented feedback whenever the interviewer tried to point out any.

Q5
Googlyness / Behavioral Questions
Behavioral

I think most of the questions I got are mentioned in this post by a fellow Leetcoder: https://leetcode.com/discuss/post/5963463/googlyness-frequently-asked-questions-by-55sh/

Google Interview Experience – Test Engineer (Onsite Round 1)
google logo
Google
Test Engineer
May 6, 20254 reads

Summary

I experienced a technical coding round at Google for a Test Engineer role, focusing on graph theory and DFS. The interview, which was medium difficulty, heavily emphasized optimizing my solution and discussing complexity, which I felt went well.

Full Experience

Interview Format:

  • Duration: 45 minutes
  • Style: Technical coding round (whiteboard/Google Docs-style interface)
  • Language: Python (but language-agnostic questions)

Discussion & Exploration:

  1. The interviewer first asked the approach to solve it i gave brute force and using DFS.

  2. Brute force solution explored all paths and maintained a full visited path to prevent cycles.

  3. Optimization was then discussed:

    • Since each node has two neighbors and the graph is a ring, simply avoiding the parent node during traversal is sufficient to prevent loops.
    • This eliminates the need for a full visited set → reduced space complexity.

Complexity Analysis:

Brute Force:

  • Time: O(N) per path × N paths = O(N²)
  • Space: O(N) for each recursive call and visited path

Optimized:

  • Time: Still O(N²) (each path is length N, and there are N such paths)
  • Space: O(N) only for output path and parent tracking (no visited set needed)

Interview Highlights:

  • The interviewer asked many deep questions:

    • Why use visited set?
    • What happens if we remove neighbor not in path?
    • How can we reduce space complexity?
    • What is the difference in complexity between using set vs list approach?
    • Can we reduce space to O(1)?
  • They appreciated reasoning about:

    • How DFS works specifically for rings
    • Importance of pruning with just prev node instead of visited
    • Using bitmask/array as a visited alternative

Key Take Aways:

  • Medium difficulty
  • Graph theory + DFS
  • Optimization discussion was key
  • Strong understanding of data structures and complexity was tested
  • Excellent round to demonstrate both coding and system-level thinking

Interview Questions (1)

Q1
Find All Ring Paths in a Connected Graph
Data Structures & AlgorithmsMedium

You are given an undirected connected graph that forms exactly one cycle (i.e., a ring). The graph is provided as an adjacency list. Your task is to print all the possible paths that form the complete ring, starting from each node.

Example Input: graph = { "A": ["B", "D"], "B": ["C", "A"], "C": ["D", "B"], "D": ["A", "C"] }

Expected Output: ABCD BCDA CDAB DABC

Key Constraints ( After verifying with the recuiter):

  • Each node has exactly two neighbors.
  • Graph forms one and only one ring.
  • All node values are unique.
  • No extra edges or branches.
how i got into Google my full story - Part - 2
google logo
Google
1.5 years
May 4, 20252 reads

Summary

I successfully navigated multiple challenging interview rounds at Google for an L3 position, overcoming anxiety and multiple reschedules, and eventually securing a team after a prolonged process.

Full Experience

Part 2 – The Rounds, The Standards, The Pressure

After getting that long-awaited email from Google HR, I had my initial screening — and I’d say I played all the right cards, because I cleared it and moved to the next step.

Soon, I was invited to an orientation call, where they broke down the entire interview process:

  • 1 Telephonic Round: Focused on DSA/Coding (Eliminatory)
  • Onsite Rounds (4 total, if you pass):
    • 2 DSA rounds
    • 1 Domain/DSA round (based on your experience)
    • 1 Googliness round (behavioral)

Then came the telephonic round — the first big test. One thing to know about Google interviews: they often keep questions vague on purpose. Not to confuse you, but to observe how well you communicate, how you break down problems, and how deeply you think.

📌 Golden Rule for Google Interviews:
  • Read the problem multiple times.
  • Ask clarifying questions.
  • Don’t rush into coding.
  • They want clean, well-thought-out solutions — not quick fixes.

My telephonic round had two tree-based questions:

  • One was centered on Inorder Traversal.
  • The other seemed like a follow-up, but turned out to be completely independent — testing if I could recognize the difference and push back if needed.
    I proposed alternate and optimized solutions to both — and that helped me stand out.

A week later, I got a call from HR: I passed! They asked for my availability for onsite interviews — five potential days. I agreed. My interviews were scheduled on four consecutive days, which was incredibly stressful.

In the week leading up, I was grinding hard on everything I ever struggled with:
KMP, Convex Hull, Segment Trees, and more. I was mentally exhausted, constantly questioning if I’d even make it.


Onsite Round 1

A two-pointer problem with precomputation, related to subarray sums.

Onsite Round 2

A recursive tree problem involving contiguous and isolated identical values.

Onsite Round 3

The interviewer didn’t show up, so it got postponed a week.
When it finally happened, it was a stack-based question involving bracket matching and equation simplification.

Googliness Round

Focused on behavioral aspects — leadership, pressure handling, communication, and ethics.


All these rounds, back to back, were mentally draining. I had panic attacks. At one point, I was literally crying and breathless during the interview, but somehow — I held it together.

I cleared 3 out of 4 rounds. The one I missed? The one where anxiety truly got the best of me.

Still, HR told me that passing 2 was enough, and I’d done really well — so they pushed me forward. I went through team matching and everything was going well... until it wasn’t.

Hiring Committee backed out , probably concerned about the one failed round, scheduled 2 more DSA interviews to be safe 🙃.

Then began a 2-month delay full of reschedules and uncertainty.


Onsite Round 4

An array-based problem involving greedy strategy, prefix sums, and hashmap balancing.
It felt like solving a complex necklace arrangement problem — but the question was poorly worded, and the test cases were brutal. I was on the edge the whole time.

Onsite Round 5

Thankfully, this was a Leetcode contest problem I’d solved 2 months ago and was daily problem a week ago 😉. The follow-up was the same, but seeing me solve quickly, the interviewer got suspicious and gave me a third follow-up.
Luckily, I had my heap, two-pointer, and binary search strategies ready — and nailed it.


After those two final rounds, I felt hopeful but also scared.
What if they think I cheated?
What if they drop me now?
I had worked too hard and come too far.

But the truth is — the real game is in how you communicate.
How you shape the problem, how you ask the right questions, how you structure your thoughts.

There were moments I was running out of time, but because my approach was solid and I picked the right data structures, I was given a pass.

A week later, HR called:

“It’s all positive! …But your matched team has moved on.”

Back to team-matching — again.

Two more weeks. Two more screenings.
Finally… I found my team.

In the next part, I’ll share how the salary negotiation unfolded, along with the perks, benefits, and everything else that came with the offer — stay tuned!


Answer to comments

1. YOE - 1.5 yrs, I have consistent leetcode streak, guardian and more than 2k problems solved on leetcode, i was in service base.
image.png

2. i got hired for L3
3. Sorry I cant share the exact problem from my interviews but it was 2 pointer problem with follow up as binary search and 2 pointer.
4. yes, my hr told me that i had 3 positive responses,I already knew i was fail in 1 interview so wasnt hard for me to understand which one they meant and the reasoning.


Interview Questions (2)

Q1
Bracket Matching and Equation Simplification
Data Structures & Algorithms

A stack-based question involving bracket matching and equation simplification.

Q2
Googliness / Behavioral Interview
Behavioral

Focused on behavioral aspects — leadership, pressure handling, communication, and ethics.

Preparation Tips

In the week leading up, I was grinding hard on everything I ever struggled with:
KMP, Convex Hull, Segment Trees, and more. I was mentally exhausted, constantly questioning if I’d even make it.

I have consistent leetcode streak, guardian and more than 2k problems solved on leetcode, i was in service base.

Number of Islands - Google L4 Interview Question
google logo
Google
May 4, 20254 reads

Summary

During a Google L4 interview, I was presented with a variation of the 'Number of Islands' problem, adapted for a binary tree structure.

Full Experience

Given a binary tree, with node values 0 and 1. Find the total number of islands in it. Same as this question, where need to find islands in matrix

Interview Questions (1)

Q1
Number of Islands in Binary Tree
Data Structures & Algorithms

Given a binary tree, with node values 0 and 1. Find the total number of islands in it. Same as this question, where need to find islands in matrix

Google Phone Screen L4
google logo
Google
SDE II5 years
May 4, 20254 reads

Summary

I had a Google phone interview for an L4 role, where I was tasked with finding the most frequent word immediately following a given word in a 2D array of phrases. Although I couldn't complete the full implementation due to time constraints, I was offered a second phone round.

Full Experience

My honest reflection:
Just wanted to share my recent experience with Google’s phone interview, in case it helps anyone else who’s preparing or feeling unsure afterward.

The problem:

Given a 2D array of word sequences (each sub-array is a phrase), build a function that takes a word as input and returns the most frequent word that immediately follows it across the dataset.
The interviewer said that the only thing we worry about is a fast lookups (because dataset could be huge).
If the input word doesn't exist in the dataset or is never followed by another word, return an empty string "".

I can't find straight LeetCode clone, but here is the similar ones:
https://leetcode.com/problems/top-k-frequent-words/description/
https://leetcode.com/problems/word-frequency/description/

What I did:

  • Asked a few questions
  • Understood the problem and explained my plan clearly
  • Suggested preprocessing the data into a frequency map for constant-time lookups
  • Started implementing, but didn’t finish the full working code in time (I’d say I completed about 60–70% of the solution)
  • I also discussed how we could extend the design in the future to support returning the top 2, 3, or more most frequent next words, not just the top one — to make the solution more flexible and scalable.

Unfortunately, the initial discussion and verbal explanation took up a lot of time — around 25-30 minutes — and I honestly didn’t realize how much time had passed. That was a mistake on my part. While it’s good advice to talk through your approach before coding, I’d caution others: don’t overdo it like I did.

What happened after:

A few days later, I got a call from the recruiter.
They told me:
“The round didn’t go as expected, but we’d like to give you one more phone round.”

My own takeaways:

Track you time during interview
Communicating clearly and staying calm is still important and valued

Interview Questions (1)

Q1
Most Frequent Following Word in 2D Array
Data Structures & Algorithms

Given a 2D array of word sequences (each sub-array is a phrase), build a function that takes a word as input and returns the most frequent word that immediately follows it across the dataset. The interviewer said that the only thing we worry about is a fast lookups (because dataset could be huge). If the input word doesn't exist in the dataset or is never followed by another word, return an empty string "".

Similar LeetCode problems include: Top K Frequent Words and Word Frequency.

Google L4 complete experience for phone screen and onsite interviews April 2025
google logo
Google
SDE IIHyderabad/Pune4.5 years
May 4, 20252 reads

Summary

I interviewed for an L4 position at Google for their Hyderabad/Pune locations. The process included a phone screen and three onsite rounds, focusing on Data Structures and Algorithms. Despite receiving mixed feedback on my solutions and speed, I found the questions mostly approachable and gained valuable insights for future interview preparation.

Full Experience

Background

Previous Experience - 4.5 YOE in Finance Tech US based bank
HR reached out to me via linkedin for Hyderabad/Pune location

Phone Screening Round

The interviewer was from Bangalore. She was helpful and nice to talk to.

Problem

Given multiple files, we want to find the maxmimum matching prefix between any 2 files.

Sample input

String[] file1 = {"hello", "world", "abc", "xyz"};
String[] file2 = {"hello", "world", "abc", "xyz1"};
String[] file3 = {"hello", "world", "abc2", "xyz"};
String[] file4 = {"hello", "world", "abc1", "xyz2"};

Answer for this is 3, since the "hello", "world", "abc" strings match in file1 and file2

Solution

I treated files as an array of Strings for ease of implementation.

Brute Force - Compare all pairs of files and find the maximum prefix
Time complexity - for N files O(N^2) to compare each file pair and O(L*S) where L is number of lines in the file and S is average length of string. The complexity goes in order of 4.

Optimized - Instead of going through all pairs we can create a Trie structure for each String line that we encounter for a file and store the frequency along with it.
Time complexity - O(N*L) N is number of files and L is number of lines in a file.

I was asked to code the brute force which I completed in 10-15 minutes. Then I was asked to code the optimized solution as a follow up. There were some bugs but I explained the code and the complexities nicely. Below is the code that I wrote after the interview.

Code


public class FilePrefixMatching {

    private static class TrieNode {
        String value;
        int freq;
        Map<String, TrieNode> nodesMap;

        TrieNode(String value) {
            this.value = value;
            freq = 1;
            nodesMap = new HashMap<>();
        }

        TrieNode insert(String word) {
            if(nodesMap.containsKey(word)) {
                nodesMap.get(word).freq++;
                return nodesMap.get(word);
            } else {
                TrieNode node = new TrieNode(word);
                nodesMap.put(word, node);
                return node;
            }
        }
    }

    private static void dfs(TrieNode node, int level, int[] res){
        if(node == null) return;
        res[0] = Math.max(res[0], node.freq >= 2 ? level : 0);
        for(TrieNode adjNode : node.nodesMap.values()) {
            dfs(adjNode,level+1,res);
        }
    }

    private static void getMaxMatchLines(List<String[]> files) {
        TrieNode root = new TrieNode(null);
        for(int i=0;i<files.size();i++) {
            TrieNode curr = root;
            String[] file = files.get(i);
            for(int j=0;j<file.length;j++) {
                curr = curr.insert(file[j]);
            }
        }
        int[] res = new int[1];
        dfs(root,0,res); // not needed, store levels in nodes
        System.out.println(res[0]);
    }

    public static void main(String[] args) {
        String[] file1 = {"hello", "world", "abc", "xyz"};
        String[] file2 = {"hello", "world", "abc", "xyz1"};
        String[] file3 = {"hello", "world", "abc2", "xyz"};
        String[] file4 = {"hello", "world", "abc1", "xyz2"};
        getMaxMatchLines(Arrays.asList(file1,file2,file3,file4));
    }
}

HR feedback - I am decent with data structures. I can work more on the testability and the debugging aspects of the code. This is a very generic feedback I think.

Self evaluation - Hire

Onsite Round 1

The interviewer was from Seattle. He was helpful and nice to talk to.

Problem

Same as Round 3 question mentioned in the post :- https://leetcode.com/discuss/post/6495560/l3-interview-experience-by-anonymous_use-3dfv/

Implementation

I was able to code the Heap with Hashmap solution. I could not come up with the Quickselect approach.

HR feedback - The interviewer conveyed to HR that I was a bit slow for the role that they were hiring for. I challenged this point with HR since the interviewer asked me to go in as much details as I can, but they did not change the evaluation.

Self evaluation - Lean Hire

Onsite Round 2

The interviewer was from Bangalore. She was helpful and nice to talk to

Problem

Given an unweighted and undirected graph, there are some friends on some nodes and there are some cafes on some nodes. We want to find such a cafe that the maximum distance travelled by any of the friend to that cafe is minimal.

Sample input

Friends - 1,7
Cafes - 5,6

Edges - 1 2, 2 3, 3 4, 4 5, 3 6, 7 5, 7 3

Distance friend 1 has to travel to reach cafe 5 and 6 is 4 and 3

Distance friend 7 has to travel to reach cafe 5 and 6 is 3 and 2

Cafe 6 is the answer since max distance travelled by both friends is less compared to cafe 5.

If its impossible to reach a cafe then return null.
There could be cycles in graph.

Implementation

I mentioned we can use Djikstra or Floyd Warshall to solve this. The interviewer was fine with this but she gave a hint by asking how would I solve it in real life. Then I suggested the multi source BFS approach. It would be optimal compared to the other 2 approaches.

Questions like https://leetcode.com/problems/rotting-oranges/ are similar to this.

HR feedback - The interviewer conveyed to HR that I did good in the interview and the got generic feedback of I can work more on the testability of the code.

Self evaluation - Hire

Onsite Round 3

The interviewer was from Bangalore. He was kind of robotic and breaking my rhythm sometimes.

Problem

I am the team manager of an F1 team. I have different tyres with each tyre having 2 attributes where t is the 1st lap time and f is the degradation factor.
For example, for completing 3 laps with a tyre with t=1s f=2, it would take following time
lap 1 - 1 sec
lap 2 - 1x2 = 2 secs
lap 3 - 1x2x2 = 4 secs
Total time = 7 secs
It follows the pattern - t + t*f + t*f^2.. + t*f^n-1

Question 1 - lets say we use a single tyre for the entire race find out the minimum time taken to complete the race.

Question 2 - if we can change the tyres, find out the minimum time it takes to complete the race. For changing a tyre it takes C secs.

I asked for the constraints but interviewer did not share them and for the question 2 also they did not share any sample input with me.

Implementation

For question 1, we can calculate the time for each tyre for each lap and minimum total time taken by a tyre would be the answer. O(N*T) would be the complexity for this approach, where N is the number of laps and T is the types of tyres.

I also mentioned that the time taken follows the GP pattern so for each tyre we can calculate the time using the GP formula which would take logarithmic time(using binary exponentiation) for each tire. O(T*log time for GP formula).

The interviewer was satisfied with this and asked me to code the O(N*T) approach.

For question 2, I came up with a MCM DP approach using memoization. I used current lap, current tyre type and number of laps old as parameters to my recursive function. Inside the recursive function I looped over all tyres to find the min time taken by each and stored it as an answer in my 3D dp memoization table. If the tyre was changed then was adding C secs to the answer. For the 1st lap we start with each tyre and the min time taken would be computed recursively by considering all choices.

The interviewer mentioned during the interview that I missed the case when we can change the tyre and use tyre of same type. Also there was also a small bug in calculating the min time. He said it looked okay.

The above solution might be opmitised by avoiding pruning some recursive calls. I am not sure whats the most optimal approach for question 2. A backtracking solution could also exist for this. Since no constraints where shared not sure if backtracking approach is acceptable.

HR feedback - The interviewer conveyed to HR that I was a bit slow and I missed few edge cases. He also mentioned that I need more practice with DSA. I challenged this by saying that I was able to come up with the approach and I was also able to code it but the evaluation remain unchanged.

Self evaluation - Lean Hire

Overall experience

My googliness was cancelled since the feedback for onsite 1 and 3 was not so good. I think 2 LH might have caused this.

I think the level of questions asked to me where pretty doable compared to other interview experiences for this role.
The 1st question was easy medium with some changes to Trie implementation.
The 1st onsite was also easy medium, the quick select approach was not intuitive for me since I haven't practiced it.
The 2nd onsite question was a proper medium question with small BFS tricks which come with some practice on Graphs.
The 3rd question was hard for me but I was able to come up with a solution for it, and despite the negative feedback I think I did okay if not good.

I did not ask for any hints in any of the rounds since the HR discourages this.

Learnings for me are to pay attention to details since they keep the questions vague and open to interpretations, asking the right questions to interviewers, use comments for easy to implement code snippets (like some classes, getters and setters rather than actually implementing them), trying to think through all the edges cases and improving my speed. With good practice we can definitely clear all interviews.

I would be able to apply again after 12 months of cooldown according to the HR. All the best for your interviews!

Interview Questions (3)

Q1
Maximum Matching Prefix Between Files
Data Structures & AlgorithmsMedium

Given multiple files, where each file is represented as an array of strings, find the maximum length of a common prefix (sequence of strings) between any two files.

For example, given:

  • file1 = {"hello", "world", "abc", "xyz"}
  • file2 = {"hello", "world", "abc", "xyz1"}
  • file3 = {"hello", "world", "abc2", "xyz"}
  • file4 = {"hello", "world", "abc1", "xyz2"}
The answer is 3, because "hello", "world", "abc" match in file1 and file2.

Q2
Find Optimal Cafe for Friends in Graph
Data Structures & AlgorithmsMedium

Given an unweighted and undirected graph, there are some friends on some nodes and there are some cafes on some nodes. We want to find such a cafe that the maximum distance travelled by any of the friend to that cafe is minimal.

Sample input:
Friends - 1,7
Cafes - 5,6

Edges - 1 2, 2 3, 3 4, 4 5, 3 6, 7 5, 7 3

Distance friend 1 has to travel to reach cafe 5 and 6 is 4 and 3

Distance friend 7 has to travel to reach cafe 5 and 6 is 3 and 2

Cafe 6 is the answer since max distance travelled by both friends is less compared to cafe 5.

If its impossible to reach a cafe then return null.
There could be cycles in graph.

Q3
F1 Race Tyre Strategy Optimization
Data Structures & AlgorithmsHard

I am the team manager of an F1 team. I have different tyres with each tyre having 2 attributes where t is the 1st lap time and f is the degradation factor.

For example, for completing 3 laps with a tyre with t=1s f=2, it would take following time:
lap 1 - 1 sec
lap 2 - 1x2 = 2 secs
lap 3 - 1x2x2 = 4 secs
Total time = 7 secs
It follows the pattern - t + tf + tf^2 + ... + t*f^(N-1).

Question 1: Let's say we use a single tyre for the entire race, find out the minimum time taken to complete the race.

Question 2: If we can change the tyres, find out the minimum time it takes to complete the race. For changing a tyre it takes C secs.

Google L3 Onsite
google logo
Google
SDE I
May 3, 20253 reads

Summary

I had an onsite interview round at Google where I encountered a challenging geometry problem about finding the largest rectangle from a given set of points.

Full Experience

Hey everyone 👋, I came across a really interesting and challenging geometry-based problem during my Google onsite round.

Interview Questions (1)

Q1
Largest Rectangle from Points
Data Structures & AlgorithmsHard

You're given a list of distinct 2D points on a Cartesian plane. Your task is to find the area of the largest rectangle that can be formed by selecting any four points from the list such that those four points form the corners of a valid rectangle.

🔹 Important Constraints:

The rectangle does not need to be axis-aligned.

The rectangle can lie in any orientation (e.g., rotated at 45 degrees).

All four corners of the rectangle must be present in the input point list.

Your goal is to compute the maximum possible area of any such rectangle.

points = [ [-5, -5], [-5, 0], [0, -5], [0, 0],
[-3, 2], [-2, 3], [1, 2], [0, 1],
[-4, -1], [1, -6], [1, -1], [-4, -6],
[2, 2], [3, 3], [4, 4],
[-2, -2], [-1, -1], [0, 0], [1, 1],
[5, 5], [-5, 5], [5, -5], [-5, -5] ]

Google - Senior Software Engineer | Bengaluru | April'25
google logo
Google
Senior Software EngineerBengaluru3.83 years
May 3, 20254 reads

Summary

I interviewed for a Senior Software Engineer role at Google in Bengaluru, which resulted in a rejection after two DSA rounds. Despite a negative outcome, I've gained valuable learning from the experience.

Full Experience

After sharing my SDE-2 interview experience at Amazon and Groww (and receiving some great feedback — thank you!), I thought I’d post another one — this time from a recent Google interview.

Hope you find it useful! As always, I’d love to hear your thoughts and feedback. Let’s dive in 👇

📌 Background B.Tech in Mechanical Engineering from one of the Top 10 IITs

10 months at a large service-based MNC

3 years at a product-based company

Current Role: SDE-2 in a product-based company

🧠 Interview Timeline 📞 Initial Call Got a call in the first week of February from the recruiter. I was given one month to prepare.

🔁 Round 1 (Originally Scheduled on March 25th) Type: DSA Round (45 mins) Interviewer: Engineering Manager from Germany Problem: A Quad Tree based image problem. WhatsApp Image 2025-05-03 at 9.19.29 AM.jpeg

Given an image represented by a quad tree, where:

Leaf nodes can be black or white,

Black leaf = block of pixels are all black

White leaf = block of pixels are all white

Non-leaf nodes = gray

The task was to calculate the area of black pixels in the image.

The starter code was in Python, but I told him I preferred C++. He kindly offered to reschedule the round so I could be more comfortable with the setup. 🙌

💻 Round 1 (Rescheduled to April 2nd) Type: DSA Round (45 mins) Interviewer: Senior SDE from Europe

Problem: Given a 2D grid of 0s and 1s, find the area of the largest triangle formed by 1s. You had to count the number of 1s inside the triangle.

Example:

Copy Edit 1 0 0 0 0 0
1 0 1 1 1 0
0 0 1 1 0 0
0 0 1 0 0 1
1 0 0 0 1 1
Expected Answer: 6

I explained a BFS-based approach and began implementing it. After nearly completing the code, the interviewer asked if I could think of a different solution. I began exploring a DP-based approach, but time ran out before I could finish or dry-run my older bfs code.

🧾 Final Update A week later, the HR called to check in. I told her the round went “okayish.” Unfortunately, she informed me that the feedback was not positive.

Final Verdict: ❌ Rejection Rejection #11 in the past year 🥲 Proudly added to my growing “Hall of Fame: No Offer” wall 😂

Failures hurt — but every round adds to the learning curve. Onward and upward 🚀

Interview Questions (2)

Q1
Quad Tree Black Pixel Area Calculation
Data Structures & Algorithms

Given an image represented by a quad tree, where: Leaf nodes can be black or white, Black leaf = block of pixels are all black, White leaf = block of pixels are all white, Non-leaf nodes = gray. The task was to calculate the area of black pixels in the image.

Q2
Largest Triangle of 1s in a 2D Grid
Data Structures & Algorithms

Given a 2D grid of 0s and 1s, find the area of the largest triangle formed by 1s. You had to count the number of 1s inside the triangle.

Example:

1 0 0 0 0 0
1 0 1 1 1 0
0 0 1 1 0 0
0 0 1 0 0 1
1 0 0 0 1 1
Expected Answer: 6

Google SWE - III Interview experience | Hyderabad
google logo
Google
SWE - IIIHyderabad
May 1, 20255 reads

Summary

I interviewed for a Software Engineer III position at Google in Hyderabad, completing a telephonic screen, three onsite technical rounds, and a 'Googlyness' behavioral round. Despite solving most problems, I was ultimately rejected.

Full Experience

Recruiter Reached out via Linkedin, asked for my contact and discussed about the role.

Telephonic round:

Started with a simple problem - Given three Integers, find the median.

Initially I gave the simple comparision based approach but He was more interested in a mathematical equation which could give the result. I understood what he was expecting and gave the mathematical formula.

Now, comes the actual problem. Easier version of this problem - https://leetcode.com/problems/product-of-the-last-k-numbers where the k is fixed and k does not change for every get() call. Luckily, I have solved this problem before. This problem was the Daily challenge on Feb 14th.

I gave the approach and he was pretty satisfied.

Recruiter reached out within an hour and she said that the feedback is positive and asked for my availability. I gave the dates and she sent the invites in a week.

Onsite Round 1:

You have a touch screen given it has a keyboard layout. Given the (x, y) coordinates which user touched, you have to print the character user entered.

The question was very ambiguos, I asked many questions in order to understand the problem and finally was able to solve this problem. The Interviewer seemed satisfied.

Onsite Round 2:

Given N as input, count the number of patterned strings.

Patterned strings are strings whose substring gives the string itself of length N when repeated any any number of times.(Only A and B characters are present)

Input: 4 Output: 4

The strings are {AAAA, BBBB, ABAB, BABA}

{AABA, AAAB, AABB} are not valid.

I was able to come up with the solution which involes checking the divisors of length N, and then for each divisor d, 2^d possible strings can be formed.

But, the issue was that this will count the duplicates as well. I said, I would be using a set, but he said we shouldn't be generating those strings itself and set is not allowed.

Finally, was not able to complete the code as time ran out.

Onsite Round 3:

Given a 10 * 10 board and N strips of length 1 * x. Check if the given board is valid or not.

The rules are

  1. Strips can be placed horizontally or vertically but not diagonally.
  2. Two strips cannot touch each other either by the side or by the corner Horizontally, vertically and Diagonally.
  3. No extra strips should be present on the board apart from the strips given in the input.

This was a simple problem, but it was implementation heavy. I was able to code everything up in time.

Googlyness:

Typical questions like How did you resolve conflicts with your team member? Tell me an instance where you went wrong and effected the team?

I prepared 4 to 5 stories before going to the interview and framed the answers in STAR pattern.

Verdict: Rejected

Google is a dream company for many developers and it was mine too. I have prepared eoungh but somehow I felt short. This hurts a lot, but may be I wasn't just good enough. I will prepare well and work on myself I guess.

Timeline

Initail Recruiter Call: 13th March Phone Screen: 7th April Onsite 1: 22nd April Onsite 2: 23rd April Onsite 3: 24th April Googlyness: 25th April

Result: 29th April

Interview Questions (7)

Q1
Find Median of Three Integers
Data Structures & AlgorithmsEasy

Given three Integers, find the median. The interviewer was interested in a mathematical equation rather than a comparison-based approach.

Q2
Product of the Last K Numbers (Fixed K)
Data Structures & AlgorithmsMedium

An easier version of LeetCode problem 1352, where 'k' is fixed and does not change for every get() call.

Q3
Touch Screen Keyboard Character Mapping
Data Structures & Algorithms

Given a touch screen with a keyboard layout and (x, y) coordinates of user touches, print the character entered. The question was ambiguous and required clarification.

Q4
Count Patterned Binary Strings
Data Structures & AlgorithmsHard

Given N as input, count the number of patterned strings composed only of 'A' and 'B' characters. Patterned strings are those whose substring, when repeated any number of times, forms the string itself of length N. For Input: 4, Output: 4 (AAAA, BBBB, ABAB, BABA). Invalid examples: AABA, AAAB, AABB.

Q5
Validate 10x10 Board with N Strips
Data Structures & AlgorithmsMedium

Given a 10 * 10 board and N strips of length 1 * x, check if the board is valid based on these rules: 1. Strips can be placed horizontally or vertically but not diagonally. 2. Two strips cannot touch each other either by the side or by the corner (Horizontally, vertically, and Diagonally). 3. No extra strips should be present on the board apart from the input strips.

Q6
How did you resolve conflicts with your team member?
Behavioral

Typical behavioral question about resolving conflicts with team members.

Q7
Tell me an instance where you went wrong and affected the team?
Behavioral

Typical behavioral question about a time you made a mistake that impacted your team.

Preparation Tips

For the 'Googlyness' round, I prepared 4 to 5 stories and framed my answers using the STAR pattern. Generally, I felt I had prepared enough, but I still fell short.

Google Interview | L4 | Interview
google logo
Google
SDE II3 years
April 30, 20254 reads

Summary

I had a phone screen interview with Google for an L4 role, where I was asked to design a custom Deque using only a HashMap. Despite performing well and impressing the interviewer, I was unexpectedly rejected without specific feedback.

Full Experience

Recently I had an phone screen round interview with Google. I was preparing very hard for this interview fast past few weeks.

I joined the interview, Interviewer greeted and made sure that i was comfortable enough before proceeding. He told me he will only ask 1 question so i don't need to worry alot. Then he gave me the problem to design a custom Deque (including all deque methods) only using a hashMap. In the begining i got confused but just after a minute i realised its fairly easy question. I explained the approach of using index as key and interviewer was satisfied. He asked me to code the approach. I coded it, covering all edge cases as well. The interview ended on a great note.

I was really excited about the result expecting a Strong Hire/ atleast Hire. Next day i got the call from the recruiter. She mentioned that they can't proceed further with me. On asking for feedback she mentioned they don't have any specific feedback. I really did great even interviewer was impressed but still it turned out to be failure. Not sure, they were just palying with the candidate's emotions or really wanted to hire.

Anyways I have a 6 months cooldown period now. But TBH I don't feel like interviewing for Google ever again. Really disaapointing.

Please comment if you had a similar situation.

Interview Questions (1)

Q1
Design Deque Using HashMap
Data Structures & AlgorithmsEasy

Design a custom Deque (including all deque methods) only using a hashMap.

Preparation Tips

I was preparing very hard for this interview for the past few weeks.

Google | L4 | Interview Experience
google logo
Google
SDE II3.9 years
April 30, 20251 reads

Summary

I interviewed for an L4 position at Google, completing two preliminary screening rounds and four onsite rounds covering DSA and Googlyness, ultimately receiving an offer after two team matching calls.

Full Experience

YOE - 3.9 years
Position - L4

TPS - 1: Last week of Feb

I dont remember the question exactly but it was a tricy greedy plus math problem. I completed the solution got 3-4 follow ups able to complete all the requirements within timeline.

Verdict : Mixed review as some code quality were not upto the mark. So another TPS got scheduled.

TPS - 2: 2nd week of March

This happened last week of february , the problem was of sliding window but it was a bit tricy and solved in optimal approach along with the few follow ups.

Verdict : Positive.

Onsite Rounds - 3 DSA + 1 Googlyness onsites scheduled in a single week (1st week of April)

Onsite - 1: 1st week of April

Problem -> Very much similar to -> how many person visible to a single guy. Tackled this with monotonic stack and it was an optimal solution. With all the edge cases covered. (Basically first they start with a basic problem and then the follow ups make the problem hard)

Verdict : Positive. (H/SH I think)

Onsite - 2: 1st week of April

Problem -> String matching and autocomplete system. Explained multiple approaches and went ahead with the trie approach and completed the solution. There was a bit difference of space complexity which I mentioned earlier and the one after optimising the time complexity, still I mentioned this and explained.

Verdict : Space complexity part was mentioned like it was not the same which I wrote in the starting. But got positive feedback as everything was fine from my side. (Hire I think)

Onsite - 3: 1st week of April

Problem 1 -> A binary search + math problem where need to search the size of the universe to fit all the galaxies.

Problem 2 -> There is a piano player and can play piano with one hand and the thumb position is given, and series of notes given to play what will be the minimum number of times player needs to move his hand to play all the notes. --> A simple 2DP approach for this works and that was optimal too.

Able to solve both the problem in optimal way with dry run within the timelines.

Verdict : Positive. (H/SH I think)

Onsite 4 -> Googlyness : 2nd week of April

This round started with intro and 6-7 scenario based problems. Followed STAR methodology and covered almost all the scenarios in best way I can do.

Verdict: Mixed review not SH I would say but yeah I think it is Hire.

Team Matching - 1: last week of April

Had a team fit call in last week of April, the team doesn't fully align what I have worked on till now as it is a IAAS but the round went well and discussion were also good.

Verdict : On Hold.

Team Matching - 2: 2nd week of May

Mostly discussion on my past work and team work alignment with some behavioural questions.

Verdict : Selected.

Final Verdict: Offer : 3rd week of May

Compensation: https://leetcode.com/discuss/post/6769504/google-l4-compensation-hyd-by-anonymous_-3azp/

Interview Questions (4)

Q1
Visible Persons
Data Structures & Algorithms

A problem very similar to 'how many persons are visible to a single guy'. This problem typically starts with a basic version and gets harder with follow-ups.

Q2
Autocomplete System Design
Data Structures & Algorithms

Design and implement an autocomplete system involving string matching.

Q3
Binary Search for Universe Size
Data Structures & Algorithms

A binary search and math problem where the goal is to search for the size of the universe required to fit all given galaxies.

Q4
Minimum Hand Moves for Piano Player
Data Structures & Algorithms

Given a piano player's thumb position and a series of notes to play, determine the minimum number of times the player needs to move their hand to play all notes. A simple 2D dynamic programming approach works optimally for this problem.

GOOGLE L3 ONSITE R1
google logo
Google
SDE I
April 28, 20252 reads

Summary

I participated in an onsite interview for Google L3 where I was presented with two data structure and algorithm problems. I successfully solved a problem involving merging changelog files with version conflict resolution and a follow-up problem to parse changelog file content into a structured format.

Full Experience

You are two files of Changelogs with version and it's messages. You have to merge both of the files into the one. All the version values inside the changelog files are sorted in descending order.

If there is a conflict of any version between two files, merge them up and the message ordering should be consistent in accordance with ChangeLog from first files to be taken first then from the second file.

Print the changes after merging the changes.

Example : ChangeLog File1:

24.0.1

Added Export functionality Fixed the template issue.

23.0.2

Added Foreign key to template table.

ChangeLog File2:

24.0.2

Created index on template.

23.0.2

Resolved merge conflicts.

Output: 24.0.2

Created index on template.

24.0.1

Added Export functionality Fixed the template issue.

23.0.2

Added Foreign key to template table. Resolved merge conflicts.

My Approach : As initially, I was a function signature of mergeChangeLogFiles(List file1, List file2) where Pair denotes : class Pair { String versionNumber; List messages; }

So, I used a normal merge approach using two individual pointers for these two list and verified whosoever was greater with version number, gets printed first. But incase of conflict, it gets prioritized by file1 messages then by file2 for that particular version number and both indexes are incremented further.

For non-printed versions, got that covered up as well by printing them individually.

Interviewer was fine with my approach.

Follow Up : Now, I had to write a helper function to extract the text from the changeLog files in the List format.

List helper(String changeLogFile);

My Approach : Gave the approach to split the string by line break('\n') and parse each version number first, then from current index move two indices ahead so to avoid '------' string. Added the messages into the pair until a new line break occured and added it to the result. Interviewer seemed satisfied with my approach and I was able to both them.

Interview Questions (2)

Q1
Merge Changelog Files
Data Structures & Algorithms

You are two files of Changelogs with version and it's messages. You have to merge both of the files into the one. All the version values inside the changelog files are sorted in descending order.

If there is a conflict of any version between two files, merge them up and the message ordering should be consistent in accordance with ChangeLog from first files to be taken first then from the second file.

Print the changes after merging the changes.

Example : ChangeLog File1:

24.0.1

Added Export functionality Fixed the template issue.

23.0.2

Added Foreign key to template table.

ChangeLog File2:

24.0.2

Created index on template.

23.0.2

Resolved merge conflicts.

Output: 24.0.2

Created index on template.

24.0.1

Added Export functionality Fixed the template issue.

23.0.2

Added Foreign key to template table. Resolved merge conflicts.

Q2
Parse Changelog File to List<Pair>
Data Structures & Algorithms

I had to write a helper function to extract the text from the changeLog files in the List format.

List helper(String changeLogFile);

MLE: Google Preliminary
google logo
Google
April 28, 20252 reads

Summary

I attended a preliminary interview at Google and was presented with a problem to group elements based on common properties.

Full Experience

Questions was we have n elements with 3 properties each we need to group the elements. If any one of the property is common those two element should be in same group.

e.g.:

elements = {
            "e1": ['red',   'circle',    'small'],
            "e2": ['blue',  'square',    'small'],
            "e3": ['green', 'triangle',  'large'],
            "e4": ['black',   'triangle',  'large'],            
            }
Output: [["e1", "e2"], ["e3", "e4"]]

Interview Questions (1)

Q1
Group Elements by Common Properties
Data Structures & Algorithms

We have n elements with 3 properties each. We need to group the elements. If any one of the property is common, those two elements should be in the same group.

e.g.:

elements = {
            "e1": ['red',   'circle',    'small'],
            "e2": ['blue',  'square',    'small'],
            "e3": ['green', 'triangle',  'large'],
            "e4": ['black',   'triangle',  'large'],            
            }
Output: [["e1", "e2"], ["e3", "e4"]]
Google L4 Experience | Reject
google logo
Google
SDE IIBLR3.8 years
April 26, 20253 reads

Summary

I interviewed for an L4 role at Google in Bangalore, experiencing multiple rounds including a phone screen and several onsite rounds. My performance was mixed, with some rounds going well and others presenting difficulties, ultimately leading to a rejection for L4 but an offer for an L3 role, which I declined.

Full Experience

TPS (Day 0):

Q1: Given a Binary Tree with Zeros and Ones, find number of islands. Island is defined as connected nodes with only ones.
Q2: Same question with slight variation: https://leetcode.com/problems/accounts-merge/description/
Exp: I had seen both the questions, Solved 1 completely, and 2nd partially.

Onsite 1 (Day 15):

Q1: https://codeforces.com/problemset/problem/448/C Exact same question word by word
Exp: It didn't go well. The interviewer wasn’t interested in the brute-force approach, and I struggled to come up with an optimized solution. In the end, both of us ended up frustrated.

Onsite 2 (Day 16):

I waited for 20 minutes, but the panel didn’t join. Rescheduled to Day 22.

Onsite 3 (Day 17):

I waited for 20 minutes, but the panel didn’t join. Rescheduled to Day 23.

Onsite 4 (Day 18):

G&L Round General questions about leadership and being a team player.
Exp: This round went good. By this point, I had already lost interest due to my performance in the first round and because I had received much better offers.

Onsite 2 (Day 22):

Q1: Started with a simple question. Given a stream of messges with phonenumber and timestamp. Find number of unique phone number
Follow up: Unique phone-number in last K mins Asked me to write some testcases. I had a discussion with him on how to do this using schedulers and background threads
Exp: The interviewer was from Germany — very helpful and cooperative. This was my best round.

Onsite 3 (Day 23):

Q1: https://leetcode.com/discuss/post/2072047/google-onsite-banglore-may-2022-patient-kem0h/
Exp: I initially suggested a brute-force approach and discussed its time complexity. About 15 minutes before the end, I figured out the right algorithm (two min heap approach) and coded it (ofc, with one bug - I just had to swap the pair elements so that the priority queue would work based on the first element). The interviewer mentioned it was a hard problem to solve and implement optimally in time. I pointed out the bug, but she said it was okay and that she understood.

Feedback (Day 50):

After three weeks of silence, I had already joined another company. The interviewer mentioned that the overall feedback wasn’t up to the mark. I didn’t ask for individual round ratings. She asked if I would be open to considering L3 roles, I declined and said I would aim for L5 next year.

Interview Questions (5)

Q1
Number of Islands in Binary Tree with Zeros and Ones
Data Structures & Algorithms

Given a Binary Tree with Zeros and Ones, find number of islands. Island is defined as connected nodes with only ones.

Q2
Accounts Merge Variation
Data Structures & Algorithms

A question similar to LeetCode's Accounts Merge problem, with a slight variation.

Q3
Codeforces 448C - Painting Fence (Exact)
Data Structures & Algorithms

The exact same question word by word as Codeforces problem 448C: Painting Fence.

Q4
Unique Phone Numbers in Stream with K-min Window
Data Structures & Algorithms

Given a stream of messages with phone number and timestamp, find the number of unique phone numbers. A follow-up asked for unique phone numbers in the last K minutes, requiring discussion on schedulers and background threads.

Q5
General Leadership and Team Player Questions
Behavioral

General questions about leadership and demonstrating abilities as a team player.

Preparation Tips

Tips

For L3/L4 roles, there's no need to prepare for System Design. If you have time, just go through previously asked LeetCode questions in sorted order. Interestingly, the question I was asked in the first round turned out to be a fairly common one.
https://leetcode.com/discuss/post/6520235/google-phone-screening-by-anonymous_user-d9l9/
https://leetcode.com/discuss/post/6157196/google-l4-interview-experience-verdict-r-fsw0/ q2 from screening

GOOGLE SDE1 OA Questions
google logo
Google
SDE1 OA
April 25, 20252 reads

Summary

This post provides the two algorithmic questions encountered during a Google SDE1 Online Assessment.

Full Experience

The online assessment for a Google SDE1 role included two distinct coding challenges. The first problem involved designing a search suggestion system with custom sorting based on popularity and lexicographical order. The second problem required finding the minimum flips to make a binary string alternating, using a fixed-length flip window.

Interview Questions (2)

Q1
Search Suggestions System with Popularity and Lexicographical Order
Data Structures & Algorithms

You are given a list of products, where each product is a string. You are also given a searchWord. After each character typed, return the top k suggestions of product names that match the typed prefix.

Each product also has an associated popularity score (Map<String, Integer>). Suggestions should be returned in order of:

  • Highest popularity score
  • If scores are equal, return the lexicographically smaller product.

You must return suggestions after each character of searchWord. Handle up to 1e5 products and optimize for performance.

Test Case:

products = ["apple", "appetizer", "application", "app", "apply", "banana", "appstore"]
popularity = {
    "apple": 80,
    "appetizer": 70,
    "application": 90,
    "app": 90,
    "apply": 85,
    "banana": 60,
    "appstore": 90
}
searchWord = "app"
k = 3

Expected Output:

[
  ["app", "application", "appstore"],     # 'a'
  ["app", "application", "appstore"],     # 'ap'
  ["app", "application", "appstore"]      # 'app'
]
Q2
Minimum Flips to Alternate Binary String (K Flip Window)
Data Structures & Algorithms

You are given a binary string s. In one operation, you can flip a subarray of length exactly k (flip all bits in that subarray). Return the minimum number of such operations needed to make the string alternating (i.e., no two adjacent bits are the same). If it's not possible, return -1.

Test Case: s = "00010111"

k = 3

Expected Output : 2

Google L4 Complete Experience
google logo
Google
SDE II3.9 years
April 25, 20253 reads

Summary

I interviewed for an L4 position at Google, completing a phone screen and four onsite rounds. Despite providing solutions for most technical questions, I don't believe I will be moving forward this time, possibly due to ghosting or ongoing hiring freezes.

Full Experience

YOE - 3.9 years Position - L4

TPS:

This happened around february , I dont remember the question exactly but it was a simple binary question where elements might be equal and we have to return the last occurence

Verdict : Passed

I got the reponse immediately but no further communication for a month , I contacted canditate support and they replied back after 2 weeks with a new recruiter and recruiter changed twice after that every week and finally had my onsite scheduled.

Onsite 1: https://leetcode.com/discuss/post/6676870/google-l4-onsite-1-by-anonymous_user-ehu5/ LC similar - https://leetcode.com/problems/last-day-where-you-can-still-cross/

Verdict (My opinion) - (LH/LNH) I couldnt code the Union Find(O(m*n)) approach completely and only code the BFS/DFS approach (O(m^2n^2)), question was straight forward but I got a bit confused.

Onsite 2: (This got rescheduled for the next day) Question was already mentioned in previous LC posts Given an expression with '+','-', small case letters and parenthesis , simplify it

a-(b-c) -> a-b+c a+(a-(b+c)) ->2a-b-c

Follow up -> What if instead of just small case letters, it could have integers as well

Verdict (My opinion) - (NH/LNH) I gave the solution with pushing signs into stack and finding the sign from current top , took me a bit of time , but answered followup as well

Onsite 3:

This question : https://leetcode.com/problems/time-taken-to-cross-the-door/description/

Verdict (My opinion) - (H/LH) Gave the priority_queue solution with O(nlogn) , interviewer asked for O(n) gave that as well as the times are already sorted just split the arrays and process with two pointers , he said no extra space , gave that solution too , he asked me to code any one of the O(n) solutions , coded the first one with extra space , He said in the beginning he might have a followup but didnt ask due to time ,thats why I dont think it will be Hire.

Onsite 4:

Googlyness , just some behaviourial questions like explaning a project I worked on end to end , any conflicts i faced and such. It went well. Not sure what the rating would be for this.

Conclusion:

Overall I dont think I will be moving forward this time , but for any others preparing for the same , focus on recently asked questions and if possible take the premium and try to do the medium/hard questions for last 3 months , all the questions I got were covered in these two. I will update with actual ratings when I get the call from the recruiter if I do :')

Edit(10 days post last onsite) :

I have gotten no call , no reply from the recruiter , looks like I might have been ghosted or related to the ongoing firing and hiring freeze. Will update if the recruiter reaches out.

Interview Questions (4)

Q1
Find Last Occurrence in Binary Search (with duplicates)
Data Structures & Algorithms

A simple binary search question where elements might be equal, and the goal is to return the last occurrence of the target element.

Q2
Last Day Where You Can Still Cross
Data Structures & Algorithms

LeetCode problem similar to 'Last Day Where You Can Still Cross'.

Q3
Simplify Expression with Parentheses and Letters
Data Structures & Algorithms

Given an expression with '+', '-', small case letters, and parentheses, simplify it. Examples: a-(b-c) -> a-b+c, a+(a-(b+c)) ->2a-b-c. Follow up: What if instead of just small case letters, it could have integers as well?

Q4
Time Taken to Cross the Door
Data Structures & Algorithms

LeetCode problem: Time Taken to Cross the Door.

Preparation Tips

Overall I don't think I will be moving forward this time, but for any others preparing for the same, focus on recently asked questions and if possible take the premium and try to do the medium/hard questions for last 3 months, all the questions I got were covered in these two.

Google L4 1st Onsite round
google logo
Google
SDE II
April 25, 20255 reads

Summary

I had my first onsite round with Google for an L4 position. I was asked to build a program for string substitution with variable references, including a follow-up on cyclic references, which I mostly solved recursively.

Full Experience

So just few minutes back I had my first onsite round with Google for L4 position(SWE-3), The interviewer was so cooperative and humble guy from Europe. Asked me to built a program to substitute a string with given variables: #{'X':'%Z%', 'Y':'45', 'Z':'32'} #string='%X%_%Y%' #output: 32_45 earlier he didn't mentioned about variables can refer to other variables too, but later he followed up with that on which I tweaked my solution to a recursive approach. Good experience over all.

Interview Questions (1)

Q1
String Substitution with Variable References and Cycle Detection
Data Structures & AlgorithmsHard

Build a program to substitute a string with given variables. The variables are provided in a dictionary-like structure, and the string contains placeholders enclosed in '%' characters.

Initial problem example:
data = {'X':'%Z%', 'Y':'45', 'Z':'32'}
string_to_resolve = '%X%_%Y%'
Expected output: '32_45'

Follow-up: Variables can refer to other variables (e.g., 'X' might refer to 'Z'), requiring a recursive approach. Also, consider cycle detection to handle cases where variables refer to each other in a loop.

LeetCode, You Did Your Best; I Did Not 😂
google logo
Google
April 25, 20255 reads

Summary

I'm sharing two Data Structures and Algorithms questions I was asked during my interviews at Google, although I unfortunately failed to solve them.

Full Experience

I have been asked 2 DS/A question in Google up until now, and I failed to solve them horribly 😂

But I wanted to contribute back to LC for helping me do the minimal prepration that I did 😅

So I thought I'd share the questions here for the community.

Interview Questions (2)

Q1
Graph Serialization and Deserialization
Data Structures & Algorithms

We are given a directed graph with node

data class Node(
    val value: Int, 
    val outEdges: List<Node>
)

We have to implement

fun serialize(node: Node): List<Int> // represents the entire graph reachable from node
fun deserialize(serializedList : List<Int>): Node // copy of the original graph
  • The serialize() function takes a node and returns a List<Int> representation of the graph.
  • The deserialize() function takes that list and reconstructs the original graph.

Constrains:

  • There can be duplicate values in different nodes.
Q2
Merge Scrolling Screenshots
Data Structures & Algorithms

Imagine building a scrolling screenshot feature. You’re given two screenshots—s1 and s2. You need to merge them into one, by trimming out the overlapping pixels.

We have to implement

fun mergeScreenshots(
    s1: Array<IntArray>, 
    s2: Array<IntArray>
): Array<IntArray>
  • s1 is always the first screenshot, and s2 is the one taken after.
  • Both screenshots will have the same dimensions (same width & height).

Test case

input:
s1 = [[1,2,3,4],
      [4,5,6,7],
      [7,8,9,0],
      [0,1,2,3]]

s2 = [[7,8,9,0], [0,1,2,3], [3,4,5,6], [6,7,8,9]]

output: [[1,2,3,4], [4,5,6,7], [7,8,9,0], [0,1,2,3], [3,4,5,6], [6,7,8,9]]

There are few edge cases in these question which you will also have to keep in mind.

Preparation Tips

I did minimal preparation with the help of LeetCode.

Google Early Career Phone Round
google logo
Google
Early Career
April 24, 20255 reads

Summary

I participated in a 45-minute technical screening round for the Google Early Career program, focusing on collaborative problem-solving and in-depth discussion of approaches before coding. I implemented a restaurant waitlist management system but realized post-interview that a more optimal O(1) solution was possible.

Full Experience

Recently, I had a screening round for the Google Early Career program. The format was straightforward: a 45-minute technical interview conducted over Google Meet, where I collaborated with the interviewer via a shared document to implement a solution.

One important learning from my past interviews was not to jump into coding immediately. This time, I spent a solid 20 minutes discussing multiple approaches, validating edge cases, and aligning expectations with the interviewer before writing any code. That initial discussion helped establish a shared understanding of the problem and potential solutions.


What Went Well

  • Identified and walked through edge cases thoroughly.
  • Performed dry runs to validate the logic.
  • Confirmed method contracts with the interviewer—for example, agreeing to return -1 when no suitable party was found.

What I Learned

  • Clarify expectations early. I missed the opportunity to ask whether returning the next nearest table size was acceptable if an exact match wasn't found. Understanding such nuances can significantly influence the design of your solution.

Interview Questions (1)

Q1
Restaurant Waitlist Management System
Data Structures & AlgorithmsMedium

You're working at a restaurant with a single waitlist for party assignments. You need to implement the following operations:

  • AddWaitlist(partySize): Adds a party to the waitlist.
  • RemoveWaitlist(partySize): Removes a party from the waitlist.
  • FindParty(numSeats): Returns the earliest party from the waitlist whose size fits the given number of seats. Returns -1 if no suitable party is found.
Google Interview Onsite
google logo
Google
April 24, 20254 reads

Summary

I was asked a ranking problem in my onsite second round. I correctly outlined the approach but only partially coded the solution.

Full Experience

The following question was asked in my onsite second round. I just told the approach correctly and coded just half of the solution.

Interview Questions (1)

Q1
Determine Precisely Ranked Players in Chess Contest
Data Structures & Algorithms

There is a chess contest between N players. Each chess player has a distinct rank (positive integer number from 1 to N). We assume that in a chess game between two players, the player ranked higher always wins. The ranks remain constant during the contest. Unfortunately, we don't know the player ranks. But we know the outcome of M games in the following format: Player #1 won #2, Player #2 won #4, ... Given the results of M games above, give me the number of ranks that can be precisely determined

Google Senior SDE-3 , initial phone screen round
google logo
Google
Senior SDE-3
April 23, 20253 reads

Summary

I had an initial phone screen round for a Senior SDE-3 position at Google, where I was asked to design a central elevator management system.

Full Experience

below 3 lines were written in doc in a slightly more ambigous way,I am writing down the final understanding:

  1. you have x elevator and f floors.
  2. commands will come in the form {timeStamp, control_panel_id, target_floor}.
  3. design central elevator management system

Interview Questions (1)

Q1
Design Central Elevator Management System
System Design
  1. you have x elevator and f floors.
  2. commands will come in the form {timeStamp, control_panel_id, target_floor}.
  3. design central elevator management system
Google L4 Interview Experience | USA
google logo
Google
SDE IIUSA
April 22, 20255 reads

Summary

I participated in two onsite rounds for a Google L4 position in the USA, where I tackled specific algorithm and data structure problems. Despite some initial missteps in my solutions and complexity analysis, both rounds were positively received, and I successfully passed the Hiring Committee.

Full Experience

Onsite round 1:

We have an undirected, connected network of cities labeled by uppercase letters. Alice starts at city A and Bob starts at city B; both want to end up in city D. They pay by the distinct roads (edges) they cross—if they ever share a cab along the same road, that road only counts once. We need to pick routes for Alice and Bob so that the total number of distinct roads either of them ever crosses is as small as possible.

This is a repeated question on Google previous interviews. IIRC, there should be LC quesiton similar to it also.

https://leetcode.com/problems/minimum-weighted-subgraph-with-the-required-paths/description/

I gave the 3 BFS solution for this but missed the case of disconnected graphs. The interviewer gave me a nudge with the edge case and I was able to correct the answer. I made a big blunder on the TC caluclation and called it O(V*E). The interviewer corrected me for O(V+E).

Apart from these there were no other issues on my code.

Not sure how Id rate this interview. If the interviwerer wants to be harsh he could reduce me to LH-H for those mistakes. But I'd say it should be a H - LSH.

Update

The recruiter told me this was a borderline round.

Onsite round 2:

We need a data structure that lets us insert arbitrary 64‑bit integers one at a time and, at any moment, return a “loose median.” The loose median is defined so that if the true median is not itself a power of two (say it lies between two powers of two), you can return any integer between those two powers; if the true median is exactly a power of two, you can return any integer between the next lower and next higher powers of two. We only need to guarantee that our returned number lies in that allowable interval—we don’t have to pick the exact median.

We have to implement insert(x) and getMedian() methods.

This is also a previous Google question (I have seen it somewhere in LC discussions).

I gave an answer that involves counting the buckets frequency. The interviewer wanted me write Testcases do Exception handling for everything.

We initially only included positive integers and later added 0, and later -ve integers to the questions and I have updated the code to accomodate it.

The TC and SC for this is O(1) as we only traverse 64 buckets. I thought of a better alternative of using Segment tree after the interview. Wont improve the TC but is faster.

One miss is while inserting the value I have missed the bucket variable from k to k+1.

This might reduce my interview performance.

Expecting H - SH.

Update

The recuriter told me this round was positve.

update 2 HC passed waiting for comp discussions.

R3 -

https://leetcode.com/discuss/post/6684774/google-l4-interview-experience-usa-by-an-bre1/

Interview Questions (2)

Q1
Minimum Distinct Roads for Two Travelers
Data Structures & AlgorithmsHard

We have an undirected, connected network of cities labeled by uppercase letters. Alice starts at city A and Bob starts at city B; both want to end up in city D. They pay by the distinct roads (edges) they cross—if they ever share a cab along the same road, that road only counts once. We need to pick routes for Alice and Bob so that the total number of distinct roads either of them ever crosses is as small as possible.

Q2
Loose Median Data Structure
Data Structures & AlgorithmsHard

We need a data structure that lets us insert arbitrary 64‑bit integers one at a time and, at any moment, return a “loose median.” The loose median is defined so that if the true median is not itself a power of two (say it lies between two powers of two), you can return any integer between those two powers; if the true median is exactly a power of two, you can return any integer between the next lower and next higher powers of two. We only need to guarantee that our returned number lies in that allowable interval—we don’t have to pick the exact median.

We have to implement insert(x) and getMedian() methods.

Google L4 || Onsite 1
google logo
Google
SDE II
April 22, 20256 reads

Summary

This post details my Google L4 onsite interview experience, which involved solving a graph connectivity problem using Union-Find to determine when a grid's first column connects to its last.

Full Experience

We have an api that tells where the next tower is constructed each day in an n*m grid, and we have an api to stop constructing towers, write a code to tell when the construction can be stopped, the construction can be stopped when the first column is connected to the last column , you can move left , right , up , down

Interview Questions (1)

Q1
Connect First to Last Column in Grid with Towers
Data Structures & Algorithms

We have an api that tells where the next tower is constructed each day in an n*m grid, and we have an api to stop constructing towers, write a code to tell when the construction can be stopped, the construction can be stopped when the first column is connected to the last column , you can move left , right , up , down

Google | L4 | Phone Screening | April 2025
google logo
Google
SDE II
April 22, 20255 reads

Summary

I had a phone screening at Google for an L4 role in April 2025 where I was asked to design an algorithm for managing birthday reminders in a family tree.

Full Experience

Question:

Design an algorithm to manage birthday reminders for your family tree. You are given a genealogical tree representing your direct ancestors, rooted at you. Each person in the tree has a name and birthday. Your task is to implement a function alarmNextBirthday() that sets an alarm for the next upcoming birthday in the family tree. After that birthday passes, alarmNextBirthday() should be called again to set an alarm for the subsequent upcoming birthday, and so on.

Approach:

  1. Maintain a Min Heap where the priority is the number of days left until their next birthday, based on today's date
  2. Build a deque from it to preserve the birthday order.
  3. alarmNextBirthday() a. Pop the front of the deque → that's the next birthday b. Append them to the back (so it recycles to next year) c. Return the person

Interview Questions (1)

Q1
Design Birthday Reminders for Family Tree
Data Structures & Algorithms

Design an algorithm to manage birthday reminders for your family tree. You are given a genealogical tree representing your direct ancestors, rooted at you. Each person in the tree has a name and birthday. Your task is to implement a function alarmNextBirthday() that sets an alarm for the next upcoming birthday in the family tree. After that birthday passes, alarmNextBirthday() should be called again to set an alarm for the subsequent upcoming birthday, and so on.

google swe l4 phone screening | rejected
google logo
Google
SWE L4
April 22, 20253 reads

Summary

I had a phone screening for a SWE L4 position at Google, where I was asked a question about active tickets within a time range. Despite coding and explaining my approach, I received negative feedback.

Full Experience

question:
given a list of tickets(start_time, end_time) and a number N. find how many active tickets were there at time t where 0<= t < N.

my approach:
1. sort tickets by start_time and then end_time in asc order
2. use two pointers i=0, j=0 to create a window
3. for any time t, size of window will give no of active tickets for that time
4. for time t+1 move pointer j to include more tickets and move pointer i to remove expired tickets


time complexity: O(nlogn)

I was able to code and explain the approach. inteviewer even said "all the best for your loop round", but got a call that feedback was -ve.

Interview Questions (1)

Q1
Count Active Tickets in Time Range
Data Structures & Algorithms

given a list of tickets(start_time, end_time) and a number N. find how many active tickets were there at time t where 0<= t < N.

Google Phone Screen - L3, Verdict: Passed
google logo
Google
SDE I
April 20, 20252 reads

Summary

I had a phone screen on 08/04 for an L3 position at Google and was asked a graph problem about finding a path between airports considering flight timings. I successfully cleared this round and am awaiting contact from a new recruiter for the next steps.

Full Experience

I had my phone screen on 08/04. I was asked a question from graphs.

We are given source and destination airports. And a list of flights, where each flight has four paramaters: from_airport, to_airport, departure_time, arrival_time. We need to return whether its possible to reach the destination from source using the given set of flights.

It is same as: https://leetcode.com/discuss/post/6352084/google-l4-phone-screening-round-by-anony-aa15/

I came up with below solutions:

  1. Bruteforce: Recursion to consider and not consider every flight - O(2^N)
  2. Simple traversal
  3. Dijkstra modification by using heap on the arrival time of the flights

I coded the last one using heap, I might have missed few corner cases though.

I heard back from recruiter on 11/04 that I cleared phone screen and my candidature would be taken forward by another recruiter. Its been a week since I got this mail but haven't heard from the new recruiter.

I am happy that I am getting time to prepare but also don't want to lose this opportunity.

Should I mail them asking about next steps? or is it okay if I wait for a week more?

Interview Questions (1)

Q1
Airport Reachability with Flight Timings
Data Structures & Algorithms

We are given source and destination airports. And a list of flights, where each flight has four paramaters: from_airport, to_airport, departure_time, arrival_time. We need to return whether its possible to reach the destination from source using the given set of flights.

Google India - Sr Software Eng (L5) [Hired] | Interview Experience, Preparation Strategy and tips
google logo
Google
Sr Software Eng (L5)India6 years
April 19, 20251 reads

Summary

I was hired for a Senior Software Engineer (L5) role at Google India after an interview process that included three Data Structures & Algorithms rounds, one System Design round, and one Googlyness & Leadership round, receiving positive feedback on all technical assessments.

Full Experience

Background

Education: Bachelor’s from Tier 2/3 College (not sure some state govt college)
Years of Experience: 6 years (Product based, mostly in MAANG)

Application process

Applied through referral [However if I have strong resume for job requirement it will go through without referral as well (Applied for L4 in 2021 without referral)]

After Resume Selection

Recruiter reachout for interviews date and explained the process. For L5, three round of DSA, one round of System design and one round of googlyness & leadership.
Recruiter told me System design and Leadership round will be conducted only if I clear DSA round ( at least 2 hire call in 3 rounds)
I will have options to have multiple round on same day or I can have it on different day as well
I had all rounds on different day (DSA had ~2/3 days of gap between each round)
For System design and Leadership round I took another 3/4 weeks
I took around 4 week to prepare ( I was already in interview mode, you can ask for more)
[My advice] I would suggest, do not hurry and take my time to prepare

Google Interview

Each round takes around 45mins, some of my round was extended to 60mins as well due to interviewers interest in follow up questions

Round 1 : DSA

Problem Statement
Given a single string which has space separated sorted numbers, determine whether a specific target number is present in the string.

E.g. Input: "1 23 34 123 453" Target: 123
Output: true

Tip: always ask follow up questions
This looks a straight forward problem of binary search but the way it should be implemented can be based on your follow up questions else you end up with solution which may not cover all the cases
  • e.g. Since input is provided in string, numbers can be large like 10000's digit large which you cannot fit in regular numeric data type in most language

Solution

  • I started with some straight forward brute force approach like, storing these into a list of integer and apply binary search.
  • Apply linear search directly over the string
  • Final solution was applying binary search directly over the string
  • Based on follow up, constraint was that numbers would fit in numeric data type (So, I ended up coding Binary search)

My take

Asking follow up question helped me writing optimal and cleaner code.

Round 2 : DSA

I don't remember the exact problem, It was based on some timeseries logging information. Optimal solution was based on sliding window.
  • I followed the same pattern, like asking follow up questions on problem statement and its constraint

My take

I found this round bit easier than the first one, as there was only one followup question was asked which my code was already handling

Round 3 : DSA

Problem was based on binary tree. It was standard binary tree problem which required some calculation on its leaf node

Solution Discussion
I provided the dfs (inorder) solution, however interviewer asked on if bfs can be applied which was like level order traversal.

Provided both the solution, fumbled a little bit in complexity analysis which I corrected when interviewer nudged me to think about different kind of trees.

Verdict: Got positive (hire / strong hire) feedback on all the DSA rounds.

Took 3/4 weeks to prepare for system design and Leadership round

Round 4 : System Design

I was asked to design small image/gifs/video hosting platform which does not require sign up.

Steps I followed

  1. Requirement Gathering (spend ~4-5mins)
Gather all the information that I can, and before moving to the next steps, follow up with interview if they are good with current requirement and assumption.
  1. Based on requirement, did some "Back of the envelope estimation"
Performed some math based on requirement.
Confirmed with interviewer on output and assumption
Tips: Write these down, so that I can come back to it for reference
  1. Outlined the high level systems which will be used
Drew high level component for the system. and explain underlying tech that can be used. e.g. storing metadata in DB (relation/non-relational) and image on file bases on storage system like S3
Had indepth discussion on relational vs non-relational. I went ahead with no-sql based db to store meta data. Provided strong points on why, I am using this
Note : I did not provided loadbalancer, gateways, proxy at this point of time
  1. Dig deeper into core component
Discussed the bottleneck of HLD components. Then introduced, tech that can be used to solve those issues like loadbalanacer, proxies (forward, backward). Cache to store metadata. Having a background image processing system to ensure images can be stored in different format to serve all kind of user (like slow internet etc)
  1. Discussed multiple bottlenecks of system and handling of different solution
Zoomed into high level components to further break down the system and its responsibilities
  1. Interviewer provided the new requirements which system should be able to handle.
Work done in step-4 & step-5 helped me in fitting these new requirements in incremental fashion rather the re-architecting the system

Discussion went for 80mins although time assigned was 60mins

My Take : System design

  1. For Sr level, general expectation is I should drive the entire system design interview and interviewer should just ask scenario and I should explain how it is being currently handled or will be handled.
  2. Keep providing my thought process to the interview and at the same time keep myself open to get the feedback and move in that direction

Verdict: Got positive (hire / strong hire) for both rounds

PS: Please don’t judge me for any grammar mistakes — this is my first time writing something like this. Just trying to give back to the community that helped me a lot during my preparation.

EDIT-1: Had to remove the external links for resources due to leetcode policy which disabled the post visiblity.
EDIT-2: If accessible, same post with external liks are available. [post with external link]
EDIT-3: Some Interview tip while interview is in progress

💡 During interview, do not hesistate to ask questions even if I think it is silly one.
💡 Do not assume anything. If assuming make sure interviewer and I are on same page about it
💡 Think loud, it provides interviewer to look into my thought process. E.g. I was taking about linear search and then storing each number in a list etc along with why it is not optimal etc and finally concluded the binary search
💡 If I get time at the end, do ask questions to my interviewer about their work, daily routine etc. I generally ask them to give me some brief intro about their work so that I can ask related questions instead of generic one

Edit-4 Binary Search on String code

Compensation Details

AMA in comments. I will try to answer as much as possible.

Interview Questions (2)

Q1
Binary Search on Space-Separated Sorted Numbers String
Data Structures & Algorithms

Given a single string which has space separated sorted numbers, determine whether a specific target number is present in the string.

E.g. Input: "1 23 34 123 453" Target: 123
Output: true

Tip: always ask follow up questions. This looks a straight forward problem of binary search but the way it should be implemented can be based on your follow up questions else you end up with solution which may not cover all the cases.
E.g. Since input is provided in string, numbers can be large like 10000's digit large which you cannot fit in regular numeric data type in most languages.

Q2
Image/Gifs/Video Hosting Platform (No Sign-up)
System Design

Design a small image/gifs/video hosting platform which does not require sign up.

Preparation Tips

Preparation Strategy [for all product based company][Generic]

DSA

Since, I was already taking some interviews, my basic concept was in check. The time that I took for Google interviews, I tried to solve 4/5 problem daily on medium/hard level on leetcode, gfg along with taking leetcode contest regularly. I used needcode roadmap to make sure that I am solving problem from different category. Created my own sheet with the problems. FYI, I used needcode roadmap just for reference so that topics are covered.
I followed multiple channels on youtube for understanding different concepts (Mostly they are quite popular on youtube). Some were really helpful and some were just copy paste of editorial.
Tip: Take as much help as I can from youtube and online resources, don't stick to one sheet (My goal should be to learn and understand fundamentals rather than focusing on one interview)
Tip: Try solving needcode roadmap problems after having good understanding of fundamental concepts. Treat this as quick revision for any interview
  • Create my own sheet and keep track of time I take to solve
  • My goal should not be just get AC on leetcode but think through the problem.
    e.g. https://leetcode.com/problems/sliding-window-maximum/description/ This problem has multiple solution. Like using basic brute force (which will throw TLE) but using multiset (leetcode will AC). However, if I dig deep I can find the better solution using deque.
  • Most interviewers have this expectation that I should gradually build up solution and pin point the bottlenecks to improve upon my solution

System Design

Preparing for this was a bit tricky. There are not enough structured resources are available for free. I started with some youtube channels on system design. First, let me provide the resources that I used to prepare for system design.

Basic Concepts : Gaurav Sen : System Design Primer ⭐️: How to start with distributed systems?

Leveling up : System Design Interview: An Insider's Guide – Volume 1 and Volume 2 by Alex Xu (you can find free pdf version on github)

I would recommend buying this book as they are really good for leveling up and preparing for interview
Alex Xu's books have some shortcoming as well. While going through the different system design aspect it talks about some choices which is not covered in details.
Tip: Dig deep into these concepts instead of memorizing for a particular problems. For e.g. It has described some locking methods for payment gateways which lacks depth. I would recommend to explore those topics if I have time.

Advance Concepts : Designing Data-Intensive Applications by Martin Kleppmann

This book has details on how to handle distributed system which requires processing of large amount of data

LLD : System design interviews are generally focus on HLD, however I have seen some companies asking LLD as well.

I followed Christopher Okhravi - Head First Design patterns (its available on youtube) while I was actually learning different design pattern
Tips:
  • Try making small notes about new terminologies that I am coming across while going through the books. This will later on help me with revisions and to recall on why and where this was being used or should be used.
  • There are 1000s of resources online, try to find the one which I find interesting.
Google L4 Interview Questions | Hyderabad
google logo
Google
SDE IIHyderabad
April 18, 20253 reads

Summary

I interviewed for an L4 position at Google in Hyderabad, completing a phone screen and two onsite rounds that involved a complex linked list problem and two LeetCode-style questions.

Full Experience

Phone Screen Round A linked list problem where each node contains a value, a next pointer, and a hash computed using the current node’s value and its next node.

Tasks included:

Insert a node at the head of the list

Validate the linked list by traversing and verifying the hash of each node

Inserting a node at position k using recursion (which requires updating the hash values of all nodes from position k up to the head)

Onsite Round 1 https://leetcode.com/company/google/discuss/1682632/Google-or-Phone-Screen-or-Number-of-Islands-in-a-Tree

Onsite Round 2 https://leetcode.com/discuss/post/4156836/merge-intervals-with-names-by-anonymous_-pbnz/

Interview Questions (3)

Q1
Linked List with Hashed Nodes
Data Structures & Algorithms

A linked list problem where each node contains a value, a next pointer, and a hash computed using the current node’s value and its next node.

Tasks included:

Insert a node at the head of the list

Validate the linked list by traversing and verifying the hash of each node

Inserting a node at position k using recursion (which requires updating the hash values of all nodes from position k up to the head)

Q2
Number of Islands in a Tree
Data Structures & Algorithms

A problem focusing on finding 'islands' within a tree structure, as detailed in the linked discussion.

Q3
Merge Intervals with Names
Data Structures & Algorithms

A variation of the classic Merge Intervals problem, incorporating names, as detailed in the linked discussion.

Google New Grad Off Campus Interview Questions 2025 | India
google logo
Google
New GradIndia
April 17, 20251 reads

Summary

This post details a comprehensive list of technical and behavioral questions encountered in a Google New Grad off-campus interview, targeting candidates for 2025 in India.

Full Experience

Google Technical Questions:

  1. Given a positive integer represented as a string, and an integer K, find the largest subsequence of length K that you can form from the given string. For example if $s=4902,$ $k=3$ the highest subsequence formed is 902.

  2. Given an array representing the distances that can be travelled on each particular day corresponding to indices, and a person has 2 options for each day - travel the given distance or take rest. If he travels, energy decreases by 1, and taking rest increases his energy by 1. Given the initial energy of the person, find the maximum distance that the person can travel.

  3. 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-C(-H)=O$ and 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.

  4. Given a network of cities represented in 2D format(co-ordinates), where each city is considered a router, this router passes information to all the other routes within its range and goes dead. All those routers that received this information will again pass the info within their range and this goes on.

    a. Given source and destination routers, return if it is possible for information to reach the destination from the source.

    b. Given source and destination routers, return the minimum range required so that information reaches the destination. (BS, maximum range is dist btw src and dest).

    c. If the router sends information to the router at the shortest distance within its range, find if information can be passed to destination from the source.

  5. Given some intervals of scheduled meetings (might be overlapping) and a

    DoNotSchedule(DNS) slot interval, return an array of slots(non-overlapping, merge if required), representing the final meeting slots such that none of them intersects with DNS slot timings.

    a. Follow-Up: If multiple, possibly intersecting DNS slots are given, return the same requirement.

  6. Given an array of numbers, you have 2 options at each index, either add its value to your score, and move the index by that value, or skip that index and move to the next index.

    a. Follow-Up: Return the path to that max. score achieved, report if an index is skipped or taken. (DP)

  7. Minecraft game: It has 2 kinds of blocks - Torch and Wire. Torches have a power level of 16. Power can range from 0-16. Power gets transmitted to adjacent blocks, while being decremented by 1. Given a series of blocks, determine the max. power level of each block in a fn calculate_power(blocks). If it's a wire block and 2 diff power levels might be possible from diff torch sources, power is not summed, but the maximum value is taken into consideration. Given the following functions -

    get_adjacent(block: Block) -> Sequence [Block] - Returns the list of blocks that are adjacent to given one.

    get_power_level(block: Block) -> int - Returns the current power level associated with a block

    set_power_level(block: Block, int) -> None - Sets the power level of a block to the specified value.

    is_torch(block: Block) -> bool - Returns true if the block is a torch

    a. Implement the calculate_power(blocks) that takes a set of blocks and returns the power of each block. (BFS - Floodfill type).

  8. Given N players, and M games and their results. Return the players whose rank can be precisely determined.

    a. Follow-Up: Return the ranks of these players. (Toposort - To determine rank use outdegree, but since the relation is transitive, (a wins over b, b wins over c, implies a wins over c), outdegree of adjacent nodes is also to be considered.

  9. Given a network of nodes, connected in an undirected, unweighted fashion. One of these nodes is corrupted and has a virality value which represents the distance until which it can corrupt other nodes too. Given a source node, find the distance from this source to all the nodes that are reachable.

    a. Follow-Up: If there are multiple corrupted nodes, find the distance to each reachable node from the source.

    b. If edges are weighted, and virality of a node is also transferred to other nodes based on the edge weights, such that for example, if virality of a node is 5 and edge weight is 3, then transferred virality is 2.

  10. A footpath is constructed with blocks of different colours. There can be contiguous blocks of the same colour. Given a particular colour, find the max length of contiguous block painted with this colour.

    a. Follow-Up: Given q queries, each with a particular colour, return the above requirement for each colour.

    b. If atmost m blocks can be repainted to maximise the answer, return the updated answer.

  11. In a tree of 0's and 1's, an island is defined as a group of 1's that are surrounded by O's or are at the boundary. Find the no. of islands in the tree.

  12. Given a list of city pairs that are connected by road. Travelling from any city to the connected city in these pairs always takes 1 hour. Every city is connected to every other city either directly or through other cities. All the cities are labelled with numbers starting with 1. If there is a city labelled with number N, then there will be exactly 1 city labelled with every number less than N. Few of the cities are blocked. We are also given a start city where we are and a destination city where we have to reach. We are given this list of these blocked cities. One can go from start to destination as long as the path between the start and the destination doesn't have a blocked city even though the start city or the destination city is blocked. Write a function that can give the least time to travel from start to destination.

  13. Given an integer array of size N, 0-based indexing, and Q queries containing a range [l,r], both inclusive and indicate valid indices such that $l<=r$ For each query, choose a subset of indices in range [l,r], and subtract 1 from the array values of these selected indices. An array is called zero array if $A[i]=0$ for all $0<=i<N$ after Q operations. Implement a function to check whether it's possible to make a zero array or not after performing the given Q operations.

  14. You and your friends are discussing about a sequence of numbers on blackboard. Each person might remember a part of sequence and each part might not be correct or not. Now everyone writes down the sequence of numbers they remember. And you are given the task of consolidating them and tell if there is a consensus or not. Here consensus means there is some valid sequence that is consistent with all the parts. For example, friends provide (1, 2, 15, 8), (2, 4, 7, 8). One person forgot 4,7 and other 1,15. Here consensus is there. Ex: 1, 2, 4, 7, 15, 8. Another example: (1, 6, 4), (4, 1). In this case there is no consensus. One person remembers 1 coming after 4 and another remembers 4 coming after 1 which is a contradiction.

  15. There are some cakes and the coordinates of the top-left corner along with its area are given for each cake. All cakes are of square shape. Given a vector of cakes, draw a horizontal line such that it divides the area of cakes equally.

    a. Class cake{ int top_leftx; int top_lefty; int area; }

    b. Follow-Up: What if the coordinates and area is not integer value but is double, and horizontal line is also not an integer.

  16. Given a binary tree with edge weights, disconnect the leaves from the root. You can remove any edges you want, but sum of edges removed must be minimum

    a. Follow-Up: What if the tree is an n-ary tree

  17. Given some chunks of files(1 to c), implement 3 functions:

    → join(user, vector ownedchunks) - Give the smallest missing positive number as user_ld to the user and store the given chunks under this user and return user_Id.

    → leave(user_Id) - Remove this user by removing user_Id and freeing up the chunks under him.

    → request(user_Id, chunkid) - Return a vector of userld's who own the given chunkid.

  18. There was a question of bank with n customers and they can withdraw or deposit money. Once they start to serve the customer they will stop untill the money left in the bank is less than the withdrawal amount. Find max no of customer bank can serve. Initially bank has some X dollars.

  19. Design a stack with operations push, pop, add where add adds the input number n to the top k elements of the stack.

  20. Given a list of documents and a list of queries, a list of corrupt queries, find the number of documents that are corrupt. A document which has a corrupt query run on it is corrupt and all the queries of a corrupt document are considered corrupt

  21. Given a field in the form of a grid of side $n\times n.$ fill the square with given crops where the count of each crop is given and they all sum up to $n^{\wedge}2$ 2.It's like suppose four types of crops are given, then the crops of same type have to be beside each other in a 2d array.Idaithe oka type of crops anni DFS chesthe vacheseyali atlaa fill cheyali ante immediate right left down top lo ekadaina undali.

  22. Window is given of k element. Find the avg of k elements while removing n largest element from that window. (ambigous)

  23. There is an array of Os and 1s. There is an API called query that returns true if there is a 1 in A[L, R and false otherwise. Given the size of the array, write a function that returns the position of all 1s.

  24. given ar[] -> values of balls(can be -ve,+ve, 0). 2 players -> each Player can pick either 1 or 2 balls at once. Both players play optimally, value of balls picked gets added to the score of players, We have to make sure that player 1 wins and return max difference of (score of player1 - player2)

  25. given a graph, each node contains pair{row,col}. matrix[m][n] -> contains houses(at pair{row,col}) and empty blocks, each house owner wants to plant in exactly one of the 4 neighbouring empty blocks, but there must be atmost 1 plant in each row and each col, return matrix after planting.

  26. We are given a list of points in the plane. Write a function to return the area of the largest rectangle formed by any four points in the list.

  27. Given an array A, a starting position S, as well as offset integer X. Return the final position of a jumping game which has the following rules:

    ➤ For every odd jump you have to jump left from current position (C) to the closest position CL, such that $A[CL]=A[C]+1$ For every even jump you have to jump right from the current position (C) to the closest position CR, such that $A[CR]=$ $A[C]+1.$

    ➤ If there is no valid position for next jump then stop jumping and return position C. ➤ For every successful jump, the array value at the position before jump (C) should

    be incremented by X. $A[C]+=X$, then proceed to the next round at the new position.

    a. Write a function which returns the position where you end after performing all suitable jumps.

    b. Follow-Up: Discuss the edge cases, where there is a possibility of infinite loop- When does it occur and how will you tackle it?

  28. There are sellers selling a product named "ABC". Every seller has their own price to sell this product for. You have to arrange the sellers in the order_book based on the ascending order of the price and if the price is the same then based on the timestamp in which they have arrived to this order_book.

    → Input: seller_id(which is unique), price and timestamp → Complete the below two functions:

    insert(seller_id,price, timestamp) -> Inserts the sellers into order_book based on the above mentioned order

    get_the_seller() -> Returns the seller_id with least price and removes the seller from the order_book

    a. Follow-Up-1: What if the sellers get anxious and leave the order_book> How would you handle this?

    b. If the price range is given for suppose 1 to 10000, and timestamps will be in ascending order, how would you optimise the above 2 functions?

  29. Implement a class called Superstack that implements the stack interface: push(k), peek(), pop().Additionally the stack should implement the function sum()--> which returns The total sum of stack and inc(n,k)--> increment the bottom n elements by k.

  30. Imagine we are on a parking garage. All day, car enters and exit. When a car enters it takes a ticket and when exits it returns the ticket. The machine prints the entry and exit on each ticket. At the end of the we have got a pile of tickets and we want to figure out how Many cars were there in the garage at each time of the day.

  31. Given a grid which consists of only one exit and many walls and robots at each of the cell. Here #-->represents the wall and .--> represents the robot and E is the exit. At each cell which has robot return the direction (U/D/L/R) such that when robot follows the direction from each cell it should eventually reach the exit. (If the direction is down and it has a wall (#) at that place then it will remain in the same position). Robot can be anywhere on the dot in the grid.

Input: 
######
#.#E.#
#....#
######
Follow UP- Return the set of commands such that if any robot follows the commands then it should pass the exit.

ex-UDULRDUL it is a command such that if we follow this every dot much pass the exit.

32. Wordle is a game where a player tries to guess a secret 5 letter word from the english dictionary.Every time the player guesses they get a clue. Our task is to create a wordle finder which helps the player by providing guesses for the secret word, given the last guess made by the player. Given access to the entire English dictionary of 5 letter word and these three letter 5-letter string inputs, generated from the players last guess.

Green: (G) letters mean that letter is both correct and in the right position

Yellow: (Y) letters means letter is in the word, but not at the right position

Red: (R) letters means the secret word does not contain the letter with an exception: If a guess contains a letter thats in the secret word and the guess has multiple instances of that letter, then the letter could appear in both Green/Yellow and Red.

Consider the case when the secret word is PLANE contains P and the guess APPLE contains the 2Ps. The first P is scored as Yellow while the second P as Red. Output the possible guesses for the secret word.

get_hints(green="PR_ _ _", yellow="_ _ M _ _", red = "_ _ _ ZF") →

[PRAMS, PRIME, PRIMI, PRIMO, PRIMP, PRIMS, PRISM, PROEM, PROMO, PROMS]

33. Each poem has a Rhyme Scheme. Where the last words of each line are-

Specialiazation (A)

Location (A)

Compile (B)

Trial (B)

Immolation (A)

3line poem-AAA, AAB, ABB, ABA, ABC.

Write a function which takes a short rhyme scheme and a long rhyme scheme and if possible extends the short one to match with the long one

EX-DEE ABBBA -> DEEED

34. Allocate books question in binary search but here it is double instead of int.

  1. The member of states of UN are planning to send 2 people to the moon. Theuy want to be from the different countries. You will be given a list of pairs of astronauts IDs. Each pair is made of astronauts of same country. Determine how many pairs of astronauts from different countries they can choose from.

    $n=4$ astronaut= [1,2], [2,3] ->3 pairs from [0,1], [0,2] and [0,3]

  2. partition the array into two parts such that sum is equal and if needed you can also remove the elements.

    Follow up- take that array now as circular. (Given a necklace with beats remove any beats such that two arrays sum is equal)

  3. Given an array of positive and negative numbers. Find the max length of the window such that sum is $>=0$

  4. longest increasing subsequence with difference k.

  5. Given a stream of numbers. Find the median of them.

  6. Given different trains with starting station, destination station, arrival time and destination time.Is it possible to reach from starting station to ending station or not??

  7. Given two arrays A and B. IF you shuffle the entries in A then B is possible. Do the similar shuffle as of A in array C and find the corresponding B.

  8. Given a compressed string, transform that into its decompressed form $a(b{3}c){2}f\rightarrow abbcabbcf$

    Follow up- Given decompressed find its compressed form.

  9. You should simplify an algebraic equation given like string $Ex: (a-b)+(b-c)=a-c$

  10. Given cities in which some cities has data centres. Now you have to put a new data centre in a city such that min distance from this city to city which already has a data centre has to be maximised.

  11. Given some free seats and occupied seats, return the longest free seats sequence.

  12. Given a sequence of numbers, return the longest sequence in which all are consecutive numbers.

    Follow up- Longest subsequence with difference atmost d

  13. All possible sequences of 1s and 2s that summed upto n.

  14. Then the actual question was

    A class was given with a dictionary passing in its constructor

    It has a method that tells the hash value for each of the word in the dictionary And another method is the one that i wrote calculating the score

    Now i had to implement another method that returns the max score anagram for each of the word.I needed to implement a function first that calculates the score of a string The score is the total distance between each letter.

  15. An acyclic graph was given, with utmost 3 neighbours and we have to find the vertex in the graph which can be the potential root of a binary tree.

Behavioural Questions:

  1. What will you do if your colleague takes credit for your work?
  2. What are your short-term and long-term goals?
  3. What will you do if you get into some clashes with your teammates?
  4. What was a tough thing you tackled in your internship and how did you do it?
  5. What was your greatest achievement in recent times?
  6. What would you do if you have problems with your colleague, if he is not cooperative?
  7. What will you do if you are not comfortable with the team, tech-stacks, etc. How would you change yourself or the situation?
  8. Describe a time when you had different opinion with your teammate. How did your team conclude the decision and how did you discuss different opinions and come up with the final decision?
  9. How will you handle hectic deadlines?

Interview Questions (58)

Q1
Largest Subsequence of Length K from String
Data Structures & AlgorithmsMedium

Given a positive integer represented as a string, and an integer K, find the largest subsequence of length K that you can form from the given string. For example if $s=4902, k=3$ the highest subsequence formed is 902.

Q2
Max Distance with Energy Constraint
Data Structures & AlgorithmsMedium

Given an array representing the distances that can be travelled on each particular day corresponding to indices, and a person has 2 options for each day - travel the given distance or take rest. If he travels, energy decreases by 1, and taking rest increases his energy by 1. Given the initial energy of the person, find the maximum distance that the person can travel.

Q3
Validate Organic Molecule Structure
Data Structures & AlgorithmsMedium

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-C(-H)=O$ and 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.

Q4
Router Network Information Propagation
Data Structures & AlgorithmsHard

Given a network of cities represented in 2D format(co-ordinates), where each city is considered a router, this router passes information to all the other routes within its range and goes dead. All those routers that received this information will again pass the info within their range and this goes on.

a. Given source and destination routers, return if it is possible for information to reach the destination from the source.

b. Given source and destination routers, return the minimum range required so that information reaches the destination. (BS, maximum range is dist btw src and dest).

c. If the router sends information to the router at the shortest distance within its range, find if information can be passed to destination from the source.

Q5
Meeting Scheduler with Do-Not-Schedule Slots
Data Structures & AlgorithmsMedium

Given some intervals of scheduled meetings (might be overlapping) and a DoNotSchedule(DNS) slot interval, return an array of slots(non-overlapping, merge if required), representing the final meeting slots such that none of them intersects with DNS slot timings.

a. Follow-Up: If multiple, possibly intersecting DNS slots are given, return the same requirement.

Q6
Max Score Jumping Game
Data Structures & AlgorithmsMedium

Given an array of numbers, you have 2 options at each index, either add its value to your score, and move the index by that value, or skip that index and move to the next index.

a. Follow-Up: Return the path to that max. score achieved, report if an index is skipped or taken. (DP)

Q7
Minecraft Power Propagation (Floodfill)
Data Structures & AlgorithmsHard

Minecraft game: It has 2 kinds of blocks - Torch and Wire. Torches have a power level of 16. Power can range from 0-16. Power gets transmitted to adjacent blocks, while being decremented by 1. Given a series of blocks, determine the max. power level of each block in a fn calculate_power(blocks). If it's a wire block and 2 diff power levels might be possible from diff torch sources, power is not summed, but the maximum value is taken into consideration. Given the following functions -

get_adjacent(block: Block) -> Sequence [Block] - Returns the list of blocks that are adjacent to given one.

 get_power_level(block: Block) -> int - Returns the current power level associated with a block

set_power_level(block: Block, int) -> None - Sets the power level of a block to the specified value.

 is_torch(block: Block) -> bool - Returns true if the block is a torch

a.  Implement the calculate_power(blocks) that takes a set of blocks and returns the power of each block. (BFS - Floodfill type).
Q8
Deterministic Player Ranks (Topological Sort)
Data Structures & AlgorithmsHard

Given N players, and M games and their results. Return the players whose rank can be precisely determined.

a. Follow-Up: Return the ranks of these players. (Toposort - To determine rank use outdegree, but since the relation is transitive, (a wins over b, b wins over c, implies a wins over c), outdegree of adjacent nodes is also to be considered.

Q9
Network Corruption Propagation
Data Structures & AlgorithmsHard

Given a network of nodes, connected in an undirected, unweighted fashion. One of these nodes is corrupted and has a virality value which represents the distance until which it can corrupt other nodes too. Given a source node, find the distance from this source to all the nodes that are reachable.

a. Follow-Up: If there are multiple corrupted nodes, find the distance to each reachable node from the source.

b. If edges are weighted, and virality of a node is also transferred to other nodes based on the edge weights, such that for example, if virality of a node is 5 and edge weight is 3, then transferred virality is 2.

Q10
Longest Contiguous Blocks of Same Color
Data Structures & AlgorithmsMedium

A footpath is constructed with blocks of different colours. There can be contiguous blocks of the same colour. Given a particular colour, find the max length of contiguous block painted with this colour.

a. Follow-Up: Given q queries, each with a particular colour, return the above requirement for each colour.

b. If atmost m blocks can be repainted to maximise the answer, return the updated answer.

Q11
Number of Islands in a Tree (0s and 1s)
Data Structures & AlgorithmsMedium

In a tree of 0's and 1's, an island is defined as a group of 1's that are surrounded by O's or are at the boundary. Find the no. of islands in the tree.

Q12
Least Time Travel with Blocked Cities
Data Structures & AlgorithmsMedium

Given a list of city pairs that are connected by road. Travelling from any city to the connected city in these pairs always takes 1 hour. Every city is connected to every other city either directly or through other cities. All the cities are labelled with numbers starting with 1. If there is a city labelled with number N, then there will be exactly 1 city labelled with every number less than N. Few of the cities are blocked. We are also given a start city where we are and a destination city where we have to reach. We are given this list of these blocked cities. One can go from start to destination as long as the path between the start and the destination doesn't have a blocked city even though the start city or the destination city is blocked. Write a function that can give the least time to travel from start to destination.

Q13
Check Zero Array with Range Subtract Operations
Data Structures & AlgorithmsHard

Given an integer array of size N, 0-based indexing, and Q queries containing a range [l,r], both inclusive and indicate valid indices such that $l<=r$ For each query, choose a subset of indices in range [l,r], and subtract 1 from the array values of these selected indices. An array is called zero array if $A[i]=0$ for all $0<=i<N$ after Q operations. Implement a function to check whether it's possible to make a zero array or not after performing the given Q operations.

Q14
Sequence Consensus from Multiple Partial Memories
Data Structures & AlgorithmsHard

You and your friends are discussing about a sequence of numbers on blackboard. Each person might remember a part of sequence and each part might not be correct or not. Now everyone writes down the sequence of numbers they remember. And you are given the task of consolidating them and tell if there is a consensus or not. Here consensus means there is some valid sequence that is consistent with all the parts. For example, friends provide (1, 2, 15, 8), (2, 4, 7, 8). One person forgot 4,7 and other 1,15. Here consensus is there. Ex: 1, 2, 4, 7, 15, 8. Another example: (1, 6, 4), (4, 1). In this case there is no consensus. One person remembers 1 coming after 4 and another remembers 4 coming after 1 which is a contradiction.

Q15
Divide Cake Area with Horizontal Line
Data Structures & AlgorithmsHard

There are some cakes and the coordinates of the top-left corner along with its area are given for each cake. All cakes are of square shape. Given a vector of cakes, draw a horizontal line such that it divides the area of cakes equally.

a. Class cake{ int top_leftx; int top_lefty; int area; }

b.  Follow-Up: What if the coordinates and area is not integer value but is double, and horizontal line is also not an integer.
Q16
Minimum Edge Removal to Disconnect Leaves from Root
Data Structures & AlgorithmsHard

Given a binary tree with edge weights, disconnect the leaves from the root. You can remove any edges you want, but sum of edges removed must be minimum

a. Follow-Up: What if the tree is an n-ary tree

Q17
File Chunk Management System
System DesignMedium

Given some chunks of files(1 to c), implement 3 functions:

→ join(user, vector<int> ownedchunks) - Give the smallest missing positive number as user_ld to the user and store the given chunks under this user and return user_Id.

→ leave(user_Id) - Remove this user by removing user_Id and freeing up the chunks under him.

→ request(user_Id, chunkid) - Return a vector of userld's who own the given chunkid.
Q18
Max Customers Served by Bank
Data Structures & AlgorithmsMedium

There was a question of bank with n customers and they can withdraw or deposit money. Once they start to serve the customer they will stop untill the money left in the bank is less than the withdrawal amount. Find max no of customer bank can serve. Initially bank has some X dollars.

Q19
Design Stack with Add to Top K Elements
Data Structures & AlgorithmsMedium

Design a stack with operations push, pop, add where add adds the input number n to the top k elements of the stack.

Q20
Count Corrupt Documents and Queries
Data Structures & AlgorithmsMedium

Given a list of documents and a list of queries, a list of corrupt queries, find the number of documents that are corrupt. A document which has a corrupt query run on it is corrupt and all the queries of a corrupt document are considered corrupt

Q21
Fill Grid with Connected Crops
Data Structures & AlgorithmsHard

Given a field in the form of a grid of side $n\times n.$ fill the square with given crops where the count of each crop is given and they all sum up to $n^{\wedge}2$ 2.It's like suppose four types of crops are given, then the crops of same type have to be beside each other in a 2d array.Idaithe oka type of crops anni DFS chesthe vacheseyali atlaa fill cheyali ante immediate right left down top lo ekadaina undali.

Q22
Window Average Excluding N Largest
Data Structures & AlgorithmsHard

Window is given of k element. Find the avg of k elements while removing n largest element from that window. (ambigous)

Q23
Find All 1s using Range Query API
Data Structures & AlgorithmsMedium

There is an array of Os and 1s. There is an API called query that returns true if there is a 1 in A[L, R and false otherwise. Given the size of the array, write a function that returns the position of all 1s.

Q24
Optimal Ball Picking Game (Max Score Difference)
Data Structures & AlgorithmsHard

given ar[] -> values of balls(can be -ve,+ve, 0). 2 players -> each Player can pick either 1 or 2 balls at once. Both players play optimally, value of balls picked gets added to the score of players, We have to make sure that player 1 wins and return max difference of (score of player1 - player2)

Q25
Plant Flowers with Row/Column Constraints
Data Structures & AlgorithmsHard

given a graph, each node contains pair{row,col}. matrix[m][n] -> contains houses(at pair{row,col}) and empty blocks, each house owner wants to plant in exactly one of the 4 neighbouring empty blocks, but there must be atmost 1 plant in each row and each col, return matrix after planting.

Q26
Largest Rectangle from Four Points
Data Structures & AlgorithmsHard

We are given a list of points in the plane. Write a function to return the area of the largest rectangle formed by any four points in the list.

Q27
Jumping Game with Dynamic Array Values
Data Structures & AlgorithmsHard

Given an array A, a starting position S, as well as offset integer X. Return the final position of a jumping game which has the following rules:

➤ For every odd jump you have to jump left from current position (C) to the closest position CL, such that $A[CL]=A[C]+1$ For every even jump you have to jump right from the current position (C) to the closest position CR, such that $A[CR]=$
$A[C]+1.$

➤ If there is no valid position for next jump then stop jumping and return position C. 
➤ For every successful jump, the array value at the position before jump (C) should

be incremented by X. $A[C]+=X$, then proceed to the next round at the new position.

a.  Write a function which returns the position where you end after performing all suitable jumps.

b.  Follow-Up: Discuss the edge cases, where there is a possibility of infinite loop- When does it occur and how will you tackle it?
Q28
Order Book Design (Min Price, Max Timestamp)
System DesignHard

There are sellers selling a product named "ABC". Every seller has their own price to sell this product for. You have to arrange the sellers in the order_book based on the ascending order of the price and if the price is the same then based on the timestamp in which they have arrived to this order_book.

→ Input: seller_id(which is unique), price and timestamp → Complete the below two functions:

insert(seller_id,price, timestamp) -> Inserts the sellers into order_book based on the above mentioned order

get_the_seller() -> Returns the seller_id with least price and removes the seller from the order_book

a.  Follow-Up-1: What if the sellers get anxious and leave the order_book? How would you handle this?

b.  If the price range is given for suppose 1 to 10000, and timestamps will be in ascending order, how would you optimise the above 2 functions?
Q29
Design Superstack with Sum and Increment Bottom N
Data Structures & AlgorithmsMedium

Implement a class called Superstack that implements the stack interface: push(k), peek(), pop().Additionally the stack should implement the function sum()--> which returns The total sum of stack and inc(n,k)--> increment the bottom n elements by k.

Q30
Parking Garage Occupancy Over Time
Data Structures & AlgorithmsMedium

Imagine we are on a parking garage. All day, car enters and exit. When a car enters it takes a ticket and when exits it returns the ticket. The machine prints the entry and exit on each ticket. At the end of the we have got a pile of tickets and we want to figure out how Many cars were there in the garage at each time of the day.

Q31
Robot Path to Exit in Grid
Data Structures & AlgorithmsHard

Given a grid which consists of only one exit and many walls and robots at each of the cell. Here #-->represents the wall and .--> represents the robot and E is the exit. At each cell which has robot return the direction (U/D/L/R) such that when robot follows the direction from each cell it should eventually reach the exit. (If the direction is down and it has a wall (#) at that place then it will remain in the same position). Robot can be anywhere on the dot in the grid.

Input: 
######
#.#E.#
#....#
######
Follow UP- Return the set of commands such that if any robot follows the commands then it should pass the exit.

ex-UDULRDUL it is a command such that if we follow this every dot much pass the exit.
Q32
Wordle Finder
Data Structures & AlgorithmsHard

Wordle is a game where a player tries to guess a secret 5 letter word from the english dictionary.Every time the player guesses they get a clue. Our task is to create a wordle finder which helps the player by providing guesses for the secret word, given the last guess made by the player. Given access to the entire English dictionary of 5 letter word and these three letter 5-letter string inputs, generated from the players last guess.

Green: (G) letters mean that letter is both correct and in the right position

Yellow: (Y) letters means letter is in the word, but not at the right position

Red: (R) letters means the secret word does not contain the letter with an exception: If a guess contains a letter thats in the secret word and the guess has multiple instances of that letter, then the letter could appear in both Green/Yellow and Red.

Consider the case when the secret word is PLANE contains P and the guess APPLE contains the 2Ps. The first P is scored as Yellow while the second P as Red. Output the possible guesses for the secret word.

get_hints(green="PR_ _ _", yellow="_ _ M _ _", red = "_ _ _ ZF") →

[PRAMS, PRIME, PRIMI, PRIMO, PRIMP, PRIMS, PRISM, PROEM, PROMO, PROMS]
Q33
Extend Rhyme Scheme
OtherMedium

Each poem has a Rhyme Scheme. Where the last words of each line are-

Specialiazation (A)

Location (A)

Compile (B)

Trial (B)

Immolation (A)

3line poem-AAA, AAB, ABB, ABA, ABC.

Write a function which takes a short rhyme scheme and a long rhyme scheme and if possible extends the short one to match with the long one

EX-DEE ABBBA -> DEEED
Q34
Allocate Books (Double Values)
Data Structures & AlgorithmsMedium

Allocate books question in binary search but here it is double instead of int.

Q35
Pairs of Astronauts from Different Countries
Data Structures & AlgorithmsMedium

The member of states of UN are planning to send 2 people to the moon. Theuy want to be from the different countries. You will be given a list of pairs of astronauts IDs. Each pair is made of astronauts of same country. Determine how many pairs of astronauts from different countries they can choose from.

$n=4$ astronaut= \[1,2], \[2,3] ->3 pairs from \[0,1], \[0,2] and \[0,3]
Q36
Partition Array (or Circular Array) into Equal Sum Halves
Data Structures & AlgorithmsHard

partition the array into two parts such that sum is equal and if needed you can also remove the elements.

Follow up- take that array now as circular. (Given a necklace with beats remove any beats such that two arrays sum is equal)
Q37
Max Length Window with Sum >= 0
Data Structures & AlgorithmsMedium

Given an array of positive and negative numbers. Find the max length of the window such that sum is $>=0$

Q38
Longest Increasing Subsequence with Difference K
Data Structures & AlgorithmsMedium

longest increasing subsequence with difference k.

Q39
Find Median from Data Stream
Data Structures & AlgorithmsHard

Given a stream of numbers. Find the median of them.

Q40
Train Travel Reachability
Data Structures & AlgorithmsMedium

Given different trains with starting station, destination station, arrival time and destination time.Is it possible to reach from starting station to ending station or not??

Q41
Apply Shuffle from A to B on C
Data Structures & AlgorithmsMedium

Given two arrays A and B. IF you shuffle the entries in A then B is possible. Do the similar shuffle as of A in array C and find the corresponding B.

Q42
Decompress/Compress String
Data Structures & AlgorithmsHard

Given a compressed string, transform that into its decompressed form $a(b{3}c){2}f\rightarrow abbcabbcf$

Follow up- Given decompressed find its compressed form.
Q43
Simplify Algebraic Equation
OtherHard

You should simplify an algebraic equation given like string $Ex: (a-b)+(b-c)=a-c$

Q44
Maximize Min Distance to Existing Data Centers
Data Structures & AlgorithmsHard

Given cities in which some cities has data centres. Now you have to put a new data centre in a city such that min distance from this city to city which already has a data centre has to be maximised.

Q45
Longest Free Seats Sequence
Data Structures & AlgorithmsEasy

Given some free seats and occupied seats, return the longest free seats sequence.

Q46
Longest Consecutive Sequence / Subsequence with Difference D
Data Structures & AlgorithmsMedium

Given a sequence of numbers, return the longest sequence in which all are consecutive numbers.

Follow up- Longest subsequence with difference atmost d
Q47
Sequences of 1s and 2s Summing to N
Data Structures & AlgorithmsMedium

All possible sequences of 1s and 2s that summed upto n.

Q48
Max Score Anagram
Data Structures & AlgorithmsHard

A class was given with a dictionary passing in its constructor

It has a method that tells the hash value for each of the word in the dictionary And another method is the one that i wrote calculating the score

Now i had to implement another method that returns the max score anagram for each of the word.I needed to implement a function first that calculates the score of a string The score is the total distance between each letter.
Q49
Find Potential Root of Binary Tree in Acyclic Graph
Data Structures & AlgorithmsMedium

An acyclic graph was given, with utmost 3 neighbours and we have to find the vertex in the graph which can be the potential root of a binary tree.

Q50
Colleague Takes Credit
Behavioral

What will you do if your colleague takes credit for your work?

Q51
Short-term and Long-term Goals
Behavioral

What are your short-term and long-term goals?

Q52
Handling Team Clashes
Behavioral

What will you do if you get into some clashes with your teammates?

Q53
Challenging Internship Experience
Behavioral

What was a tough thing you tackled in your internship and how did you do it?

Q54
Greatest Recent Achievement
Behavioral

What was your greatest achievement in recent times?

Q55
Dealing with Uncooperative Colleague
Behavioral

What would you do if you have problems with your colleague, if he is not cooperative?

Q56
Adapting to Uncomfortable Team/Tech-Stacks
Behavioral

What will you do if you are not comfortable with the team, tech-stacks, etc. How would you change yourself or the situation?

Q57
Resolving Team Opinion Differences
Behavioral

Describe a time when you had different opinion with your teammate. How did your team conclude the decision and how did you discuss different opinions and come up with the final decision?

Q58
Handling Hectic Deadlines
Behavioral

How will you handle hectic deadlines?

Google L3 Interview Questions | Bangalore
google logo
Google
SDE IBangalore
April 17, 202512 reads

Summary

I successfully completed an L3 interview at Google Bangalore, received positive feedback from the hiring manager, and ultimately secured an offer after team matching.

Full Experience

Phone Screen Round

Imagine you are standing at an incoming conveyor belt of items that need to be packaged into boxes of exactly three items that all fit together and placed on a second, outgoing, conveyor belt. You have sufficient storage space to place items off to the side while you wait for a full triplet that all fit together.

Conveyor belt items are floating point numbers. Three items that "fit together" means that all items are within distance d of each other. Once a 3 tuple is formed, those items must be discarded (should not be considered for future tuples).

input_stream = [1.0, 11.0, 12.0, 13.0, 2.0, 3.0]
d = 3

Output: [[11.0, 12.0, 13.0], [1.0, 2.0, 3.0]]

Distance is calculated by absolute values of the items for example |1.0-2.0| = 1 <= 3 |2.0 - 3.0| = 1 <= 3 |1.0-3.0| = 2 <= 3

Input will not be given as an array but instead is a stream of numbers. The question is the same as here. Look at user foraccode's reply for the code. I gave the same solution but instead of using an array, used a binary search tree.

Follow Up

If instead of just floating point numbers, you were given points on an X-Y plane, how would you modify the solution?

Round 1

Question 1

Given a node in a Binary Search Tree (BST), find the next largest (inorder successor) and next smallest (inorder predecessor) node. It is guaranteed that these nodes always exist (i.e the input node will never be the smallest or largest node in the BST).

You are only given a pointer to the node, and each node has a parent pointer.

The structure is as follows:

struct Node {
int value;
Node* left_child;
Node* right_child;
Node* parent;
};

Consider this BST:

        4
/ 
2 6 / \ /
1 3 5 7

If the given node is 3, the next largest (successor) is 4, the next smallest (predecessor) is 2.

To find the next largest (successor), we must consider 2 cases:

  1. Node has a right child - In this case, the successor is the leftmost node in the right subtree.
  2. Node has no right child - In this case, move up to the parent until the current node is a left child. That parent is the successor.

Similarly, for the next smallest (predecessor), just flip the above logic:

  1. Node has a left child - The predecessor is the rightmost node in the left subtree.
  2. Node has no left child - Move up to the parent until the current node is a right child. That parent is the predecessor.
def find_successor(node):
if node.right_child:
curr = node.right_child
while curr.left_child:
curr = curr.left_child
return curr
else:
while node.parent and node != node.parent.left_child:
node = node.parent
return node.parent

def find_predecessor(node): if node.left_child: curr = node.left_child while curr.right_child: curr = curr.right_child return curr else: while node.parent and node != node.parent.right_child: node = node.parent return node.parent

Question 2

Given a source, destination and corrupted node, find if it is possible to reach the destination from the source.

This is a straightforward BFS / DFS question. Just don't traverse the corrupted node.

Follow Up

Return the minimum distance of every node from the source node. The edge weights can all be considered as 1.

Since I had used BFS to solve the question initially, I just modified it to store the distances as well (Since all edge weights are the same, we don't need to use Djikstra).

Round 2

This was a Googliness round. We went over my resume and general questions were asked. You can search up these questions quite easily on Google, Leetcode and YouTube. It was just a general discussion.

Round 3

Question 1

Given 2 strings, return if they are buddies. 2 strings are buddies if the distance between each char of the strings is the same. dist('a', 'b') = 1 and dist('b', 'a') = 25. Also, dist('z', 'a') = 1.

This was an extremely easy question. I was honestly surprised.

def are_buddies(a: str, b: str) -> bool:
if len(a) != len(b):
return False

# Compute the circular distance between characters
diff = (ord(a[0]) - ord(b[0])) % 26

for i in range(len(a)):
    if (ord(a[i]) - ord(b[i])) % 26 != diff:
        return False

return True

Follow Up

Given a list of strings, group all buddies together.

This can be solved in O(NK) where N is the number of words and K is the average length of the word. The idea is to generate a hashable signature for each word based on the relative character distances. If two strings are buddies, their signatures will be the same.

"abc" → differences:
b - a = 1, c - b = 1 → hash = "1#1"

"def" → differences:
e - d = 1, f - e = 1 → hash = "1#1" → buddies with "abc"

This signature helps group all buddy strings together.

from collections import defaultdict

def get_buddy_key(word: str) -> str: key = [] for i in range(1, len(word)): diff = (ord(word[i]) - ord(word[i - 1])) % 26 key.append(str(diff)) return '#'.join(key)

def group_buddies(words): groups = defaultdict(list) for word in words: key = get_buddy_key(word) groups[key].append(word) return list(groups.values())

Round 4

You are given a list of N elements. Each element is a tuple (value, can_decrement) where:

  • value is an integer (positive or negative),

  • can_decrement is a boolean indicating how the value can be adjusted: If True, you are only allowed to decrement the value. If False, you are only allowed to increment the value.

    You are allowed to increment/decrement each number as much as you want, but only in the allowed direction. Your task is to determine whether it's possible to transform all values into a valid permutation of [1, 2, ..., N].

    If it's possible, return the mapping in the form {original: transformed} If it's not possible, return an empty dictionary.

    This was the toughest question I got across all interviews. I took around 30 minutes to arrive at this solution. I started with a suboptimal solution. The interviewer nudged me in the correct direction and I was able to come up with this idea. She was satisfied and I coded this up.

    This was my solution:

    def can_transform(input_list):
    decrement_list, increment_list = [], []
    for value, can_decrement in input_list:
    if can_decrement:
    decrement_list.append(value)
    else:
    increment_list.append(value)

    decrement_list.sort() increment_list.sort()

    target = 1 # Try to start making the permutation from 1 ... N mapping = {} for value in decrement_list: if value < target: return {} mapping[value] = target target += 1

    for value in increment_list: if value > target: return {} mapping[value] = target target += 1

    return mapping

    Follow Up

    How many elements can be moved from the decrement list to the increment list and still allow a permutation to be made?

    I thought for a while and tried to answer it. I wasn't happy with my answer and I don't remember what it was either. Maybe someone can help out in the comments here. Maybe there is an answer here using binary search, now that I think about it. But I don't want to :)

    Closing

    Anyway, those were all the questions I got! 1 day after the interviews, I had my team matching round. Around 3 days later I got news that the hiring manager's feedback was positive and I got an offer! Good luck to everybody trying to land a job at Google!

    Compensation Overview: https://leetcode.com/discuss/post/6661297/google-l3-bangalore-by-anonymous_user-irpc/

Interview Questions (9)

Q1
Find Triplet in Stream with Threshold
Data Structures & Algorithms

Imagine you are standing at an incoming conveyor belt of items that need to be packaged into boxes of exactly three items that all fit together and placed on a second, outgoing, conveyor belt. You have sufficient storage space to place items off to the side while you wait for a full triplet that all fit together.

Conveyor belt items are floating point numbers. Three items that "fit together" means that all items are within distance d of each other. Once a 3 tuple is formed, those items must be discarded (should not be considered for future tuples).

input_stream = [1.0, 11.0, 12.0, 13.0, 2.0, 3.0]
d = 3

Output:
[[11.0, 12.0, 13.0], [1.0, 2.0, 3.0]]

Distance is calculated by absolute values of the items for example |1.0-2.0| = 1 <= 3 |2.0 - 3.0| = 1 <= 3 |1.0-3.0| = 2 <= 3

Input will not be given as an array but instead is a stream of numbers.

Q2
Find Triplet in Stream with Threshold (X-Y Plane Follow-up)
Data Structures & Algorithms

If instead of just floating point numbers, you were given points on an X-Y plane, how would you modify the solution?

Q3
BST Inorder Successor and Predecessor with Parent Pointer
Data Structures & Algorithms

Given a node in a Binary Search Tree (BST), find the next largest (inorder successor) and next smallest (inorder predecessor) node. It is guaranteed that these nodes always exist (i.e the input node will never be the smallest or largest node in the BST).

You are only given a pointer to the node, and each node has a parent pointer.

The structure is as follows:

struct Node {
    int value;
    Node* left_child;
    Node* right_child;
    Node* parent;
};

Consider this BST:

        4
       / \
      2   6
     / \ / \
    1  3 5  7

If the given node is 3, the next largest (successor) is 4, the next smallest (predecessor) is 2.

To find the next largest (successor), we must consider 2 cases:

  1. Node has a right child - In this case, the successor is the leftmost node in the right subtree.
  2. Node has no right child - In this case, move up to the parent until the current node is a left child. That parent is the successor.
Similarly, for the next smallest (predecessor), just flip the above logic:
  1. Node has a left child - The predecessor is the rightmost node in the left subtree.
  2. Node has no left child - Move up to the parent until the current node is a right child. That parent is the predecessor.
Q4
Path Existence in Graph with Corrupted Node
Data Structures & Algorithms

Given a source, destination and corrupted node, find if it is possible to reach the destination from the source.

Q5
Minimum Distance from Source in Unweighted Graph (BFS)
Data Structures & Algorithms

Return the minimum distance of every node from the source node. The edge weights can all be considered as 1.

Q6
Check if Two Strings are Buddies (Circular Distance)
Data Structures & AlgorithmsEasy

Given 2 strings, return if they are buddies. 2 strings are buddies if the distance between each char of the strings is the same. dist('a', 'b') = 1 and dist('b', 'a') = 25. Also, dist('z', 'a') = 1.

Q7
Group Buddy Strings
Data Structures & Algorithms

Given a list of strings, group all buddies together.

This can be solved in O(NK) where N is the number of words and K is the average length of the word. The idea is to generate a hashable signature for each word based on the relative character distances. If two strings are buddies, their signatures will be the same.

"abc" → differences:
b - a = 1, c - b = 1 → hash = "1#1"

"def" → differences:
e - d = 1, f - e = 1 → hash = "1#1" → buddies with "abc"

This signature helps group all buddy strings together.

Q8
Transform List to Permutation of 1 to N with Decrement/Increment Constraints
Data Structures & Algorithms

You are given a list of N elements. Each element is a tuple (value, can_decrement) where:

  • value is an integer (positive or negative),
  • can_decrement is a boolean indicating how the value can be adjusted: If True, you are only allowed to decrement the value. If False, you are only allowed to increment the value.

You are allowed to increment/decrement each number as much as you want, but only in the allowed direction. Your task is to determine whether it's possible to transform all values into a valid permutation of [1, 2, ..., N].

If it's possible, return the mapping in the form {original: transformed} If it's not possible, return an empty dictionary.

Q9
Transform to Permutation (Move Elements Follow-up)
Data Structures & Algorithms

How many elements can be moved from the decrement list to the increment list and still allow a permutation to be made?

Google Onsite round 2
google logo
Google
April 17, 20254 reads

Summary

I experienced an onsite interview round at Google which involved a detailed problem on implementing an auto-complete feature for street names.

Full Experience

Auto-complete feature:

  • a list of known street names.
  • each street name: a counter for popularity.
  • the user enters a string, treat it as a prefix of street names.
  • we return a list of at most K best matched street names.

known street names: [{steven rd, 1}, {stevenson st, 2}, {ford ave, 3}] user: "ste" => matches: [{steven rd, 1}, {stevenson st, 2}] K=2 => steven rd, stevenson st (same matches as asked) K=1 => stevenson st (more matches than asked) K=3 => steven rd, stevenson st (less matches than asked)

user: "f" or "fo" or "for" or "ford" => ford ave

If there are more than k matches, then return the top k popular streets.

Interview Questions (1)

Q1
Auto-complete Feature for Street Names
Data Structures & Algorithms

Design and implement an auto-complete feature given:

  • A list of known street names, each with a counter for popularity.
  • When a user enters a string, treat it as a prefix of street names.
  • Return a list of at most K best matched street names, prioritized by popularity if more than K matches exist.

Example: known street names: [{steven rd, 1}, {stevenson st, 2}, {ford ave, 3}] user: "ste" => matches: [{steven rd, 1}, {stevenson st, 2}] If K=2 => steven rd, stevenson st If K=1 => stevenson st (top 1 by popularity) If K=3 => steven rd, stevenson st (only 2 matches)

user: "f" or "fo" or "for" or "ford" => ford ave

Google PhoneScreening SDE2
google logo
Google
SDE II4 years
April 16, 20253 reads

Summary

I had a phone screening for an SDE2 role at Google where I was asked to implement a movie recommendation system based on transitive similarity. I was rejected due to nervousness, mixing up syntax, and using the wrong heap type.

Full Experience

YOE : 4Y+

Question Similar to

movie recommendation system. Each movie has a title and a rating, if the process has marked movie A as similar to movie B, and movie B similar to movie C, we will also consider movie A as similar to movie C

Given a movie from the list, return its N similar movies with highest rating.

For example, if we have the following four movies:

"Movie A" with rating 6 "Movie B" with rating 7 "Movie C" with rating 8 "Movie D" with rating 9 and the process has determined the following similarities:

"Movie A" is similar to "Movie B" "Movie B" is similar to "Movie C"

Solution I gave

https://leetcode.com/playground/YvepGCT9

Verdict : Reject

I was not prepare for the Interview got very nervous about approach so I mixed up with java and C++ syntax as it was just a normal text editor didn;t get noticed

Instead of min heap used Max heap

But this was the overall code that I used

Interview Questions (1)

Q1
Movie Recommendation System with Transitive Similarity
Data Structures & Algorithms

Implement a movie recommendation system. Each movie has a title and a rating. If a process marks movie A as similar to movie B, and movie B as similar to movie C, then movie A is also considered similar to movie C (transitive property).

Given a movie from the list, return its N similar movies with the highest rating.

For example, if we have the following four movies: "Movie A" with rating 6 "Movie B" with rating 7 "Movie C" with rating 8 "Movie D" with rating 9

And the process has determined the following similarities: "Movie A" is similar to "Movie B" "Movie B" is similar to "Movie C"

Google SRE-2 | Warsaw | Phone Screen Round
google logo
Google
SRE-2Warsaw
April 15, 20253 reads

Summary

I had a phone screen for an SRE-2 role at Google in Warsaw. The interviewer was friendly, and I was given a problem based on 'Kth Largest element in a data stream', which I successfully solved and discussed follow-up questions. I was later selected for onsite interviews.

Full Experience

Applied on their careers page and got the call.

Interviewer was from Zurich. He was very friendly and helpful.

Was given 1 month to study.

Question was a spinoff of "Kth Largest element in a data stream"

---
You are given a collection(basically a class) which has 2 functions.
- addNum
(adds a number given as parameter to the stream)

- findLargest
(finds the kth largest in the stream, here k is given as parameter in the stream)

Clarifying questions asked:
❓Does the stream contain duplicates?
➡️Yes

❓How big can the stream be?
➡️It will fit in memeory

❓ Discussed a few testcases with him then.
➡️like [1,2,3,4,5,6,8,8,8,9,10] Here, the 1st largest is 10, 2nd largest is 9 and 3rd, 4th, and 5th largest is 8 and then so on to understand the handling of 8.

❓ What is k is greater than length of data stream or can k be negative?
➡️Return None and not -1 as numbers in the stream can be negative

---

Approach Discussed:

- Use Binary Search for finding index of insertion and insert(TC: O(log N))
For the time complexity, I made a mistake as insert in Python takes O(N) but I said O(1), so overall it is O(N) and not O(logN).
- findLargest(use len of num and subract the kth value from it and return, here the interviewer said you are open to use 0 based indexing and 1 based indexing, k is given as a parameter), I used 1 based indexing.

The interviewer agreed and said sounds good.
I started coding it and was done in the next 10 minutes.



---

Follow up 1: What if k == len(stream): I dry ran the code and showed that it worked fine and returned the lement of the 0th index.

Discussion: Since, add takes O(N) and findLargest takes O(1), can we make add a little light and findLargest a bit heavy time complexity wise, I was thinking but then he gave the hint of queue like a priority queue. I did say yes, then we can do add in O(log N) and return kth largest in O(1)

Follow Up 2:
Return kth largest everytime, like basically it was like:
add(2) #[2]
add(3) #[3,2]
findLargest() #returns 3
add(4) #[4,3,2]
findLargest() #returns 3
findLargest() #return 2

I replied with we can take a pointer and keep it increasing after we get an element, once it goes out of length of stream, we return -1 and he was satisfied.

After this the time was over and we ended the interview after I asked him his day to day life at Google.

-------

Do you guys think? Will I be selected for onsite interviews?

My personal review: Lean Hire/Hire.

Edit: Got selected!

Interview Questions (1)

Q1
Kth Largest Element in a Data Stream (Custom Class)
Data Structures & Algorithms

You are given a collection(basically a class) which has 2 functions.
- addNum
(adds a number given as parameter to the stream)

- findLargest
(finds the kth largest in the stream, here k is given as parameter in the stream)

Clarifying questions asked:
❓Does the stream contain duplicates?
➡️Yes

❓How big can the stream be?
➡️It will fit in memeory

❓ Discussed a few testcases with him then.
➡️like [1,2,3,4,5,6,8,8,8,9,10] Here, the 1st largest is 10, 2nd largest is 9 and 3rd, 4th, and 5th largest is 8 and then so on to understand the handling of 8.

❓ What is k is greater than length of data stream or can k be negative?
➡️Return None and not -1 as numbers in the stream can be negative

Preparation Tips

Was given 1 month to study.

Google Phone Screening Round - L5
google logo
Google
SDE III
April 15, 20252 reads

Summary

I experienced a phone screening round with Google for an L5 position and was presented with a sequence merging problem, which I solved using topological sort.

Full Experience

You have sequence array, each sequence has some value in order. You have to create a result where order of sequence stays as it is. Ex - [ [1,2,15,8], [2,4,7,8], [2,3,7,15] ] Output - 1,2,3,4,7,15,8 or 1,2,4,3,7,15,8 False case - [[1,6,4], [4,1]] -

Solved this using toposort. Created an adjList and indegree matrix and traversed the list to get the result array. For false case, checked if the cycle exists

Interview Questions (1)

Q1
Merge Sequences Maintaining Relative Order
Data Structures & AlgorithmsHard

You have sequence array, each sequence has some value in order. You have to create a result where order of sequence stays as it is. Ex - [ [1,2,15,8], [2,4,7,8], [2,3,7,15] ] Output - 1,2,3,4,7,15,8 or 1,2,4,3,7,15,8 False case - [[1,6,4], [4,1]] -

Google L3 Phone screen round
google logo
Google
SDE I
April 14, 20257 reads

Summary

I experienced a Google L3 phone screen round where I was given a problem similar to LeetCode's 'Move Pieces to Obtain a String' with a follow-up. I solved the initial part but ran out of time on the follow-up, ultimately leading to rejection.

Full Experience

Exactly same as but problem was framed in different way: https://leetcode.com/problems/move-pieces-to-obtain-a-string/description/

Follow up: What if pieces can go out of scope of array?

intialState: "_ L _ L L _ R L _ R R R _"

targetState: "_ _ _ _ L _ R L _ _ _ _ R"

output:  true

Was able to solve first part For follow up told that we can remove the chunk of L's from beginning and same for R's from end. And check the middle part using original problem.

He told it is not necessary that pieces will be removed. I mean we need to track indexes. Time was over.

Will I get call for onsites?

Edit: I was rejected. Reason given was that he gave hints ( he just told one edge case, which i think was even mentioned as edge case because problem statement was not explained precisely, that too was discussed before writing the code. My code covered all edge cases in first run.)

Anyways, they wont even match my current base, forget about my base after appraisel.

Interview Questions (2)

Q1
Move Pieces to Obtain a String
Data Structures & Algorithms

The problem was exactly the same as LeetCode's 'Move Pieces to Obtain a String' but framed in a different way.

Q2
Move Pieces to Obtain a String with Out-of-Scope Movement
Data Structures & Algorithms

Follow up: What if pieces can go out of scope of array?

Given:

intialState: "_ L _ L L _ R L _ R R R _"

targetState: "_ _ _ _ L _ R L _ _ _ _ R"

output:  true

The interviewer suggested that we could remove chunks of 'L's from the beginning and 'R's from the end, then check the middle part using the original problem logic, but then clarified that pieces might not be removed and we need to track indexes.

Another Google L3 Post | Not what I expected | India | Offer
google logo
Google
SDE Iindia2 yearsOffer
April 13, 202543 reads

Summary

I successfully cleared the Google L3 interviews in India, receiving an offer despite my current compensation being higher. The interview process spanned several months and included unexpected questions beyond typical DSA problems, such as estimation and design and test rounds.

Full Experience

My journey through the Google L3 interviews was quite an experience, not entirely what I expected. It took 3-4 months from start to finish, and honestly, by the end, my interest had waned.

Phone Screen [Elimination Round]

My phone screen involved a problem where I had a very large number and an integer k, and I needed to find the largest k-digit number that was a subsequence of the original. I initially proposed a digit DP solution, but while coding, I realized a better monotonic stack approach existed. There might have been some communication issues on my end, so I ended up optimizing the digit DP. However, I eventually explained the monotonic stack idea, and the interviewer agreed it would've been better. Surprisingly, I cleared this round.

Onsite 1

For the first onsite round, I encountered a unique problem: given the shift timings of several waiters, I had to find all non-overlapping intervals during which the set of waiters on duty remained constant. I implemented a basic O(N^2) solution. The interviewer didn't ask for optimizations, and I didn't think of one at the time, although I later solved it in O(N log N). Follow-ups included handling duplicate entries and a full dry run with TC/SC analysis.

Onsite 2

This round challenged me to design, implement, and test a custom tree structure. Given a list of strings, the rule was that if one string was a prefix of another, the shorter string became the parent of the longer one, choosing the longest prefix as the parent if multiple existed. I considered both a map-based solution and a Trie but opted for the map for quicker implementation. The interview was split into three parts: design discussion, coding implementation with interviewer feedback, and finally, writing comprehensive test cases, which was a new experience for me.

Onsite 3

The third onsite round presented a real-life problem: scaling the Android pattern lock to an N*M grid. I had to count the number of different patterns possible under specific rules (at least 2 dots, 4-directional movement, one dot used once, any length). I approached this using backtracking and a visited grid, solving it with relative ease. A recursive dry run was required, which was quite challenging. Follow-up questions included estimating the size of the final answer, modifying the code for 8-directional movement, and finally, a simplified scenario where any dot could connect to any other, which I solved using permutations and combinations.

G&L Round

The G&L round was a standard behavioral interview, but it was intense. I was asked 5-6 questions and felt heavily scrutinized, especially during the last two. I made sure to use the STAR method to structure my answers.

Interview Questions (5)

Q1
Find Largest K-Digit Subsequence
Data Structures & Algorithms

You have a very very big number 2123470299109372 and a given integer k [let's say k=6], you need to find largest k digit number which is a subsequence of the original number. For example, if the number is 2123470299109372 and k=6, the answer is 999372.

Q2
Find Non-Overlapping Intervals of Waiter Shifts
Data Structures & Algorithms

You are given the shift timings of several waiters in a restaurant. Each waiter has a shift start time, and a shift end time. Your task is to find all non-overlapping intervals during which the set of waiters on duty remains the same.

Input:

NameStart TimeEnd Time
Harry Puttar10100
Tony Bhai Stark60120
Sherlock Bholmes3070
Katniss Devi150300

Output:
Start TimeEnd TimeWaiters on Duty
1030Harry Puttar
3060Harry Puttar, Sherlock Bholmes
6070Harry Puttar, Sherlock Bholmes, Tony Bhai Stark
70100Harry Puttar, Tony Bhai Stark
100120Tony Bhai Stark
150300Katniss Devi

Q3
Design and Implement Prefix Tree
Data Structures & Algorithms

Design, Implement and Test a Tree, which is built on the following rules: You are given a list of strings: ["apple", "app", "bat", "batter", "battle", "cat"]. The root of the tree is an empty string. For any string in the list, if there exists another string that is a prefix of it, then the shorter string becomes the parent node of the longer string. If there are multiple possible parents, choose the longest prefix as the parent. For example, "app" is a prefix of "apple", so "app" becomes the parent of "apple". Your task is to build and represent this tree structure.

           ""
/ | 
app bat cat / /
apple batter battle

Q4
Android Pattern Lock Paths
Data Structures & Algorithms

This was a real-life question: if the Android pattern lock was scaled to have N*M dots (N rows and M columns), how many different patterns could be created? The rules were: at least 2 dots must be connected, dots can be connected in 4 directions (left, right, top, bottom), one dot can be used only once, and the pattern can be of any length.

Q5
Behavioral Questions (G&L Round)
Behavioral

5-6 behavioral questions were asked. I was thoroughly challenged, especially with the last two questions. The STAR method was essential for effectively answering these questions.

Preparation Tips

I used to be an Expert in Codeforces and a Guardian in LeetCode. Although the interview process also included Pnc, answer estimation, and design and test questions, my primary preparation involved competitive programming.

Google L4 Phone Screen
google logo
Google
SDE II
April 12, 20254 reads

Summary

I had a phone screen for an L4 role at Google where I was asked to find indices of ranges where a number lies. I was only able to provide an O(n*maxRange) approach and believe I will be rejected.

Full Experience

Find indices of ranges where a number lies.

ranges = {3 , 9} , {2 , 8} , {5 , 10} f(3) should return { 0 , 1} f(9) should return {0 , 2}

Bummed out because I was only able to give O(n*maxRange) approach. O(n * maxRange) for building the ArrayList[] array during the initialization and doing each query in O(1) time

maxRange being the maximum value of right - left in a range {left , right}

After the interview was able to figure out it would probably be solved by Segment Tree, which I did not study :(

I think I'll be rejected.

Interview Questions (1)

Q1
Find Indices of Ranges Where a Number Lies
Data Structures & Algorithms

Given a list of ranges, for example ranges = {{3, 9}, {2, 8}, {5, 10}}, and a query number x, return the indices of all ranges i such that ranges[i][0] <= x <= ranges[i][1].

Example: f(3) should return {0, 1} (since 3 is in {3,9} and {2,8}) f(9) should return {0, 2} (since 9 is in {3,9} and {5,10})

Preparation Tips

I realized after the interview that the problem could likely be solved with a Segment Tree, which I had not studied.

Google Phone Screening, USA
google logo
Google
phd early careerUSA
April 10, 20254 reads

Summary

I experienced a Google phone screening for a PhD early career role in the USA. I encountered a variation of the Basic Calculator I problem, where numbers were replaced by letters, and I struggled to solve it within the time limit.

Full Experience

Today I gave my google phone screening (phd early career). And I was not able to solve it in time. The problem was basically Basic calculator 1 with all the numbers converted to letters ( figured it out). I have to simplify the following expression which includes [letters, (,),+,-] Such as "a+b+(a-b)+((a-b)+2b)>>3a+2b"( order does not matter) I started with stack. but then realised it is little bit different than when there is number Could not came out all the if /else conditions properly. and time ran out. I have started taking preperations with leetcode for 3 months ( around 200 problems).But still I was not confident I would be able to clear google one. And I could not. It seems to me I am doing problems with patterns, but when some complicated problems come up I just can not solve it. Do i need to do more problems? I dont know!!

**The interviewer later told me the solution will have one dictionary to count the numbers of chars and dynamically update it. and one stack to process signs. **I beleive I saw this problem some where, may be leetcode discussion.

Interview Questions (1)

Q1
Simplify Algebraic Expression with Letters
Data Structures & Algorithms

The problem was basically Basic calculator 1 with all the numbers converted to letters. I have to simplify the following expression which includes [letters, (,),+,-] Such as "a+b+(a-b)+((a-b)+2b)>>3a+2b"( order does not matter)

Preparation Tips

I have started taking preperations with leetcode for 3 months ( around 200 problems).

Google India | L3 | Reject
google logo
Google
SDE IIndia1.8 years
April 10, 20255 reads

Summary

I interviewed for an L3 role at Google India and, despite positive feedback and team matching, I was rejected by the Hiring Committee due to hints taken in one round. I have 1.8 years of experience.

Full Experience

Hi community, wanted to share happy news that I got offer but God has other plans! Currently at well known product based company with 1.8 yrs of experience

Timelines: TPS : 6th Mar, 2025 - strong positive 1st Onsite : 21st Mar - strong positive 2nd Onsite : 24th Mar - mixed review but not negative Gnl : 25th Mar - positive 3rd Onsite : 26th Mar - positive

I had awesome recruiters who were literally the best and pouring positivity throughout the process, i got to know that i cleared interviews on 27th mar with positive feedback and i got team matched the very next day, one week of waiting and today I recieved rejection from HC, I took some hints in second onsite which was mentioned in the feedback, my recruiters were very positive that I will receive offer but not this time and since I got rejected at HC cooldown will be 18months, I have did cp in the past and I currently do problems randomly, literally in tears now but will bounce back!

Questions :

TPS : https://leetcode.com/discuss/post/4929501/google-onsite-interview-by-anonymous_use-srpw/ -> I had this in the reverse way, follow up first and then kadanes - solved it easily.

Onsite 1 : variation of this question : https://leetcode.com/discuss/post/1376156/google-onsite-4th-round-by-anonymous_use-p8f9/ - solved it optimally without hints

Onsite 2 : it was fairly simple question - he asked me to find subset sum less than equal to k, I wondered if there is some twist, gave him nlogn, nlogm where m is number of elements in heap approach, he wanted it still better, he told me to think of algorithm which performs good in average case, then reframed question as find k minimum elements, then figured out it was quickselect algorithm, coded it properly but took some time for design because we need to take care of left and right sums, received mixed feedback as I took hints

Onsite 3: infix notation conversion - solved it easily, followup was to minimise brackets, took some time figured out and then told approach we ran out of time before implementation but got good positive feedback

Gnl: standard questions, interviewer was very chill

all my rounds were taken by european interviewers and I felt i recieved easy questions but HC told I took hints which is not good it seems, only in round 2 I took hints and that costed me. I found LC community to be very helpful, wanted to give back, they asked me tentative joining date and every other thing, I literally thought I made it because I have never seen google process so fast for a candidate, so fast for rejection! I thought atleast, I will have another round but really not sure why straight rejection considering I solved all problems in all rounds and hiring manager really wanted to have me in their team, the bar is quite very high!

Interview Questions (4)

Q1
Subset Sum Less Than or Equal to K
Data Structures & Algorithms

The interviewer asked me to find subset sum less than equal to k. I gave him nlogn, nlogm where m is number of elements in heap approach. He wanted it still better, he told me to think of algorithm which performs good in average case.

Q2
Find K Minimum Elements
Data Structures & Algorithms

The interviewer reframed the question to find k minimum elements.

Q3
Infix Notation Conversion
Data Structures & Algorithms

Convert infix notation. Solved it easily.

Q4
Minimize Brackets in Infix Notation
Data Structures & Algorithms

Follow-up was to minimise brackets in the converted infix notation.

Preparation Tips

I have did cp in the past and I currently do problems randomly.

Google India L5
google logo
Google
SDE IIIIndia
April 9, 20257 reads

Summary

I applied for an L5 position at Google India via referral, undergoing three coding rounds with a mix of Leaning Hire and Leaning No-hire verdicts, ultimately leading to a potential downlevel offer to L4, which I plan to decline.

Full Experience

Applied via referral

Initially the recruiter shared invites for three coding rounds. There was no phone screen.


Round 1:
https://leetcode.com/problems/zero-array-transformation-i

This was the initial problem.
As a follow up I was asked what is the minimum number of queries to take from start using which the zero array transformation could be achieved.

Follow up problem link: https://leetcode.com/problems/zero-array-transformation-ii

Approach: I solved the initial problem quickly but didn't get the follow-up. The interviewer hinted at q log n approach which made me realize thinking about Binary search.

Verdict: Leaning No-hire

Round 2:

https://leetcode.com/problems/range-module/solutions/

The problem was similar to above but instead of finding if a range of numbers was present, I was asked to check if a number was present.

Approach: I gave the solution using traversing the set. The interviewer seemed satisfied although the feedback was of only Leaning hire

Verdict: Leaning Hire

Round 3:

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

Approach: Used dp with memoization to solve the problem

Verdict: Leaning Hire

Currently I am getting signs from recruiter that I might be downleveled. I won't be going ahead with L4 as I am already SDE-2 at a good company with pay close to L4 google.

With two leaning hire and a leaning no-hire getting L5 isn't easy.

Hope this article helps!

Interview Questions (4)

Q1
Zero Array Transformation I
Data Structures & Algorithms

This was the initial problem.

Q2
Minimum Queries for Zero Array Transformation (Follow-up)
Data Structures & Algorithms

As a follow up I was asked what is the minimum number of queries to take from start using which the zero array transformation could be achieved.

Q3
Range Module - Check Number Presence
Data Structures & Algorithms

The problem was similar to above but instead of finding if a range of numbers was present, I was asked to check if a number was present.

Q4
Minimum Hand Raises on Piano
Data Structures & Algorithms

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

Google India L4 Interview Experience
google logo
Google
SDE IIIndia3.5 years
April 9, 20256 reads

Summary

I applied to Google India for an L4 role and after a lengthy interview process involving a screening, three onsite rounds, and a Googlyness round, my application advanced to the team matching phase. Despite positive feedback on most rounds, the process was described as tiresome due to multiple reschedules.

Full Experience

Current Org: Oracle India Current Position: IC3 a.k.a. SDE2 Current Exp: 3.5 years

It all started when I applied to Google on October 2024 directly on their career page without any referral.

Surprisingly, I got a call from the recruiter a couple of days later for a screening round. Since I was not prepared, I asked for four weeks. My interview was scheduled around mid-November 2024.

Screening (Mid-November 2024)

This interview was the: You are given a stream of messages from a chat group in the form

[["Username1","message"],["Username2","message"],...] and a value K. 

You need to find the top K users in the group based on the number of messages.

Approach: Priority Queue

I was able to solve it in 20 minutes with clean and runnable code. No follow up questions.

After the interview, I did not hear from the recruiter for nearly two weeks. I got a call in the first week of December. She informed me that I had qualified for the onsite rounds and she would be scheduling it in December itself. I sent her the dates which were around the end of the month, but did not get any reply from her side for a couple of weeks again. In the last week of December, she called and informed me that interviewers were not available and my interview would happen in the middle of January.

Round 1 (Mid-January 2025)

At the beginning, the interviewer told me he would ask more than one question. He seemed grumpy.

The first question was like this: You are given a string which will only have ‘L’ and ‘R’ pieces and black space ‘_’. L pieces will move only to the left, R to the right. Pieces cannot jump over one another. For a given initial and final state, return true if we can reach to final state from initial, else return false.

Example:

Input: Initital: R__L, Final: _RL_
Output: True

It is same as Swap Adjacent in LR String.

Approach: Two pointers

It took me a lot of time to explain my approach to the interviewer. And he did not get time to ask the next question.

Round 2 (End January 2025)

It was a pretty easy round. The interviewer was very friendly.

In a 2D space, you are given N routers each having the same radius of R. The routers are initially in the OFF status. You select 1 router, it turns on and pings all the routers that are within its radius. You need to find the minimum time at which all the routers will turn ON.

Approach: BFS

He modified the question later with each router having its own radius and asked me to do minimal change to incorporate the change. Thankfully, I was following OOD to write the code.

Round 3 (End Feb 2025)

This was again a cakewalk. The question was to create a string replacement library. Given a map of string replacements, replace the value in the input string.

Example:

Map: {USER => admin, HOME => /%USER%/home}
Input: I am %USER% My home is %HOME%
Output: I am admin My home is /admin/home

Approach: Recursion, but need to cover cases to handle %'s actual usages.

He later modified the question to include something like a loop. We need to figure out how to detect and handle that.

Example:

Map: {USER => admin, HOME =>/%USER%/%PATH%/, PATH => %HOME%}

I suggested a logic very similar to DFS for detecting a cycle and if and when we get one, we can just throw an error.

Googlyness (Mid March 2025)

Standard Behavioural and situational questions from this.

Feedback

I got a call from the recruiter literally an hour after the Googlyness round.

  • 1st Onsite: Below Average (Still don’t know WTF happened there)
  • 2nd Onsite: Positive
  • 3rd Onsite: Positive
  • Googlyness: Positive

My application got moved on for team matching for L4 roles. Thankfully, I did not get bumped down to L3.

It has been more than six months. All the interviews apart from screening and the second onsite got rescheduled at least twice. This is a tiresome process. Google should really improve its hiring process.

At the time of posting this, I am still in the team matching phase. I went through two fitment calls, one I didn’t like, the other, the interviewer did not like me. If and when anything changes, I will update this post.

I only prepared for Google and in the meantime an Amazon offer fell into my lap. More of that is here and here.

Interview Questions (5)

Q1
Top K Users in Chat Group by Message Count
Data Structures & Algorithms

You are given a stream of messages from a chat group in the form [['Username1','message'],['Username2','message'],...] and a value K. You need to find the top K users in the group based on the number of messages.

Q2
Swap Adjacent in LR String
Data Structures & Algorithms

You are given a string which will only have ‘L’ and ‘R’ pieces and black space ‘_’. L pieces will move only to the left, R to the right. Pieces cannot jump over one another. For a given initial and final state, return true if we can reach to final state from initial, else return false. Example: Input: Initital: R__L, Final: RL Output: True It is same as Swap Adjacent in LR String.

Q3
Minimum Time to Turn On All Routers
Data Structures & Algorithms

In a 2D space, you are given N routers each having the same radius of R. The routers are initially in the OFF status. You select 1 router, it turns on and pings all the routers that are within its radius. You need to find the minimum time at which all the routers will turn ON. He modified the question later with each router having its own radius and asked me to do minimal change to incorporate the change. Thankfully, I was following OOD to write the code.

Q4
String Replacement Library with Cycle Detection
Data Structures & Algorithms

The question was to create a string replacement library. Given a map of string replacements, replace the value in the input string. Example: Map: {USER => admin, HOME => /%USER%/home} Input: I am %USER% My home is %HOME% Output: I am admin My home is /admin/home. He later modified the question to include something like a loop. We need to figure out how to detect and handle that. Example: Map: {USER => admin, HOME =>/%USER%/%PATH%/, PATH => %HOME%}. I suggested a logic very similar to DFS for detecting a cycle and if and when we get one, we can just throw an error.

Q5
Googlyness Behavioral Questions
Behavioral

Standard Behavioural and situational questions from this.

Preparation Tips

I only prepared for Google and in the meantime an Amazon offer fell into my lap. More of that is here and here. For the Googlyness round, I referred to standard behavioural and situational questions from this.

Google L4 SWE3
google logo
Google
L4 SWE3
April 8, 20252 reads

Summary

I was asked a challenging optimization problem about ice cream sellers and kids, requiring finding a minimum range for sellers to cover all kids. I initially provided an O(nklog(max-min)) solution and later thought of an O(nlogK) improvement.

Full Experience

There are K ice cream sellers who need to distribute ice creams to the kids of Ice-Town. Ice-Town can be represented as the x-axis where kids are standing at different x coordinates, which are given to you. A seller can only serve kids which are in his range, for example, if a seller is placed at X and his range is E then all kids in the range [X−E, X+E] can get ice creams from them. All the sellers have an equal range E.

Since the sellers are lazy so they want you to find the minimum range E such that all the kids in Ice-Town can get ice creams.

Both the sellers and children coordinates are given in arrays as input.

Answer:

Sort the seller and binary search on the min, max of the children coordinates as range.

Final complexity of my answer came out to be O(nklog(max-min)). The interviewer said the factor k could be improved.

After the interview I though of nlogK solution. For a given kid, you find the closest seller using binary search. If the kid’s coordinate exactly matches a seller, then the distance is 0. Otherwise, the binary search returns a negative insertion point indicating where the kid’s coordinate would be inserted; then you compare the seller immediately to the left and to the right of that insertion point.

Interview Questions (1)

Q1
Minimum Range to Cover All Kids with K Sellers
Data Structures & Algorithms

There are K ice cream sellers who need to distribute ice creams to the kids of Ice-Town. Ice-Town can be represented as the x-axis where kids are standing at different x coordinates, which are given to you. A seller can only serve kids which are in his range, for example, if a seller is placed at X and his range is E then all kids in the range [X−E, X+E] can get ice creams from them. All the sellers have an equal range E.

Since the sellers are lazy so they want you to find the minimum range E such that all the kids in Ice-Town can get ice creams.

Both the sellers and children coordinates are given in arrays as input.

Google | L5 | Round 2
google logo
Google
SDE III
April 8, 20253 reads

Summary

I had a second round interview at Google for an L5 position, where I was asked two parts of a string prefix matching problem. I discussed binary search and Trie-based approaches, identifying a minor bug in my initial solution.

Full Experience

Given an array of strings sorted in lexiographic order. Find how many strings matches a given prefix .

I used binary search to find the lowest and highest index in arr where prefix is matched. in one of the loop to check if pattern is prefix of a string or not i missed the check of pattern length > string length. Interviewer pointed it out , not sure how much it will affect my chances

Time complexity logN * Pattern length

Part 2 -> Now string array is fixed but you are getting lots of queries with different pattern.

Created a Trie out of the input string and then use the pattern to match how many string in the trie matches a prefix

Time complexity of preprocessing -> O(N * L) where L is average length of string

Time complexity of query -> O(p)

here i defined trieNode as

TrieNode -value -children[26]

another question came up was to optimisze the space here in that case it was better to use a hashmap instead of an array of 26 fixed length.

Interview Questions (2)

Q1
Count Strings with Prefix (Sorted Array)
Data Structures & Algorithms

Given an array of strings sorted in lexiographic order. Find how many strings matches a given prefix.

Q2
Count Strings with Prefix (Multiple Queries Optimized)
Data Structures & Algorithms

Now the string array is fixed but you are getting lots of queries with different patterns. Optimize the solution to handle multiple queries.

Screening Round with Google !!!
google logo
Google
April 8, 20254 reads

Summary

I had a disappointing screening round with Google where I struggled to understand and solve a complex string parsing problem, despite extensive DSA preparation.

Full Experience

I've been preparing for DSA for over three months, diligently solving more than 372 problems on LeetCode. But what happened next was something I never expected. When you fail to understand the question, what worse could possibly occur? Here's the question that left me baffled:

I realized that the problem required a brute force approach, utilizing a hashMap to check if a sequence exists and decide whether to extend it or not. However, the first rule contradicted my assumptions, leading to confusion. I spent over 30 minutes trying to understand the problem before finally started coding as a last resort.

Interviewer did walk me thorough the appraoch as below. If not seen in map, add it in map and also in sequence. if seen in map extend it. But i was still not clear on when we cant extend. e.g. abccccd 1 - a not seen put in map extend sequence map[a],res:[a] 2 - b not seen put in map extend sequence map[a,b], res:[a,b] 3 - c not seen put in map extend sequence map[a,b,c] res:[a,b,c] 4 - c seen put in map extend the sequence map[a,b,c,cc] res:[a,b,c,cc] 5 - here we cant extend c as cc and cc as ccc beause it breaks rule one so we have to take cd here. i was really confused with what rule we took cd as d is not seen yet. Either my uderstanding was going wrong or the interviewer was not getting what i am asking.

This was a disappointing experiance. I am greatful to google and the interviewer for this opportunity.

Interview Questions (1)

Q1
Get Phrases from String with Rules
Data Structures & Algorithms

Given a string get the phrases. e.g goooooogle, res = g, o, oo, ooo, gl, e e.g abccccd, res = a,b,c,cc,cd

Rules: 1 - Concatenating all phrases should recreate the original string. 2 - You can extend the phrase with a previously seen phrase or start a new one if not seen. 3 - each phrase has to be as long as possible.

Preparation Tips

I've been preparing for DSA for over three months, diligently solving more than 372 problems on LeetCode.

Google Phone Screen Interview Round
google logo
Google
April 8, 20254 reads

Summary

I participated in a phone screen interview round with Google, where I was tasked with evaluating a given mathematical expression.

Full Experience

Given the expression "add(5,mul(2,pow(5,2)))"

Output will be 55.

Interview Questions (1)

Q1
Evaluate Mathematical Expression
Data Structures & AlgorithmsMedium

Given the expression "add(5,mul(2,pow(5,2)))"

Output will be 55.

Google L4 Telephone Screen
google logo
Google
SDE II
April 7, 20253 reads

Summary

I had a telephone screen with Google for an L4 role where I was presented with the 'Linear Chess' problem.

Full Experience

Linear Chess


Given two strings, start and target. Is it possible to reach target from start given the conditions.

  1. String can contain "L", "R" or "_".
  2. L denotes a left pawn which can move only in left direction, R denotes a right pawn which can move only in right direction.
  3. Pawns can't capture or jump over other pawns.

Example : start = "LL" target = "L_L_" output - True

Interview Questions (1)

Q1
Linear Chess
Data Structures & Algorithms

Given two strings, start and target. Is it possible to reach target from start given the conditions.

  1. String can contain "L", "R" or "_".
  2. L denotes a left pawn which can move only in left direction, R denotes a right pawn which can move only in right direction.
  3. Pawns can't capture or jump over other pawns.

Example : start = "LL" target = "L_L_" output - True

Google L3 TPS(March)
google logo
Google
April 7, 20255 reads

Summary

I had my Google phone screen at the end of March for an L3 position, where I was presented with a graph problem similar to LeetCode's Minimum Weighted Subgraph, adapted for an undirected and unweighted graph, along with a follow-up about multiple friends reaching a destination.

Full Experience

I had my Google phone screen round at the end of march. I was asked similar question to this Minimum Weighted Subgraph with the Required Paths but the graph in the question given to me was undirected and unweighted graph. Follow-up: What if there are 3 friends trying to reach the 4th friend? Was able to come up with the optimal solution for the initial question but did not had enough time for the follow-up.

Interview Questions (2)

Q1
Minimum Paths in Undirected Unweighted Graph
Data Structures & Algorithms

I was asked a question similar to this LeetCode problem: Minimum Weighted Subgraph with the Required Paths. However, the graph in the question given to me was undirected and unweighted.

Q2
Multiple Friends Reaching a Destination
Data Structures & Algorithms

Follow-up: What if there are 3 friends trying to reach the 4th friend?

Google Phone Screen - L4 (SWEIII)
google logo
Google
SWEIII3 years
April 7, 20255 reads

Summary

I had a phone screen for a Google SWEIII (L4) role, where I was given a problem to find the first failing commit in a range and multiple follow-up questions exploring optimizations using binary search, multithreading, and parallel API calls. Initially, the recruiter informed me they would not proceed, but later offered a second phone screen opportunity.

Full Experience

University : India
Work Ex : ~3 years
Last Company : MAANG

Question :
Recently, I had my phone screen round with Google, I was asked, Given range of commits (a,b), find the pivot point from where the commit started to fails. 'a' will always pass while b will always fail. Given a api method which you can use to know a specific commit passes or fails.

I started with the Brute force approach of linear Search, then I optimised it with Binary Search.

I exlained the approaches, discussed the time complexity and dry run each of them. After the interviewer was satisfied. He told me to code binary search, which i did in couple of minutes.

He mentioned to think about the edge case, to which i mentioned that the given statement of b will always fail we will have an answer.

Follow up :

The range is very big, how would you approach the problem now.

I thought about it for a moment then mentioned we could use multithreading and divide it into to multiple subRange we will try to find the first failure point for each subrange. and then iterate over the resultant vector to get the first result.
Time Complexity : O(KlogM) K -> number of sub Range, M -> len

He asked me to do optimization. Now the api method can also handle multiple commits at the same time parallely to get the pass and fail for all of them. I thought about it. and came with a better solution that we can use the binarySearch on the subRange as well, We will try to find the failure point for mid subRange if that gives the failure try to look for smaller subRange on left side subRange else go to higher number subRange.
Time Complexity -> O(logK
logM)

Now he asked me K will be also dependent and could be N if M = 1. Which our machine could not handle again.

I thought for a sec and told him we could get the min Failure point for each subRange using the given API method which could make
Time Complexity : O(logK)

In the end, I couldn't anything else and I felt He was not satisfied.

Update :
Recruiter reached out to me mentioning they will not be proceeding further

Update :
I had a call with recruiter. She mentioned they are giving me one more chance with another phone screen.

Interview Questions (4)

Q1
Find First Failing Commit in a Range
Data Structures & AlgorithmsMedium

Given range of commits (a,b), find the pivot point from where the commit started to fails. 'a' will always pass while b will always fail. Given a api method which you can use to know a specific commit passes or fails.

Q2
Optimize First Failing Commit for Large Range
Data Structures & AlgorithmsHard

The range is very big, how would you approach the problem now.

Q3
Further Optimize First Failing Commit with Parallel API
Data Structures & AlgorithmsHard

He asked me to do optimization. Now the api method can also handle multiple commits at the same time parallely to get the pass and fail for all of them.

Q4
Final Optimization for First Failing Commit with Parallel API
Data Structures & AlgorithmsHard

Now he asked me K will be also dependent and could be N if M = 1. Which our machine could not handle again.

Google L3 Interview Experience
google logo
Google
SDE I
April 6, 20253 reads

Summary

I experienced a Google L3 interview which included a technical phone screen and a 4-round onsite. Despite some challenges and self-perceived difficulties, I provided my self-verdicts for each round and anticipate mixed feedback.

Full Experience

Interview Rounds:

Technical Phone Screen (In december first-second week): Question 1: One question was based on using some random number everytime and find and remove element on that index. Question 2: Given a list of n elements in array, in one operation you need to delete that element and twice of that element, tell min moves required to make array empty.

Self Verdit: Hire/Strong Hire (Don't think this interview feedback get considered or not)

Onsite (3 Rounds) (Recently): Round 1: Given a 2D matrix contains values 0 and 1, where grid[i][j] represent probability to win for i player against player j. You have given order of games in which it gets played tell winner of tournament.

Initially framed as a normal problem, but the follow up was that grid values can be in decimal between (0 and 1), then tell the winner just the approach. Got Stuck in follow up took hints and interview went on 10 mins more then 45 minutes.

Self Verdict: Hire/Lean Hire

Round 2: Topological sort question Did code quickly and was asked a follow up on it tell that also.

Self Verdict: Hire/Strong Hire

Round 3: Graph Based Problem Was given array in which two friends and time when they will become friends, and was also given two friends F1 & F2, need to tell minimum time when they will become friends. Solved using graph and dp array to store min time for 2 friends when they became friends, but messed a bit in that interview while writing code dont know why.

Self Verdict: Hire/Lean Hire

Round 4: Googlyness Round Was asked questions on work exp and standard behavioural questions.

Self Verdict: Hire

Think it will be a mixed feedback from interviewers so chances are very less.

Hope it helps.

Interview Questions (4)

Q1
Delete Element and Its Double to Empty Array
Data Structures & Algorithms

Given a list of n elements in array, in one operation you need to delete that element and twice of that element, tell min moves required to make array empty.

Q2
Tournament Winner Probability with Dynamic Probabilities
Data Structures & Algorithms

Given a 2D matrix contains values 0 and 1, where grid[i][j] represent probability to win for i player against player j. You have given order of games in which it gets played tell winner of tournament. Initially framed as a normal problem, but the follow up was that grid values can be in decimal between (0 and 1), then tell the winner just the approach. Got Stuck in follow up took hints and interview went on 10 mins more then 45 minutes.

Q3
Minimum Time for Friends to Connect in a Graph
Data Structures & Algorithms

Graph Based Problem Was given array in which two friends and time when they will become friends, and was also given two friends F1 & F2, need to tell minimum time when they will become friends.

Q4
Googlyness / Behavioral Questions
Behavioral

Was asked questions on work exp and standard behavioural questions.

GOOGLE Interview Experience || Fresher || SWE - ll || INDIA
google logo
Google
SWE - llINDIA
April 5, 20255 reads

Summary

I interviewed with Google for a SWE-II role in India as a fresher and successfully received an on-campus offer after multiple technical and Googlyness rounds.

Full Experience

Google Problems + (My estimated mapping to LeetCode level) 👇

ROUND 1 : Online Assessment

Q1) Based on Range Sum (LeetCode Hard) Q2) Based on DP involving OR and XOR operations (LeetCode Hard)

ROUND 2 : Technical Round

Q1) Based on Sliding Window (LeetCode Easy) Q2) Follow up on Q1 adding queries (LeetCode Medium) Q3) Follow up having at most k operations allowed (LeetCode Medium) Q4) Follow up having q queries and at most k operations allowed (LeetCode Hard)

ROUND 3 : Technical Round + Googlyness

Q1) Based on previous and next Greater Element using Stacks + Prefix Sum (LeetCode Medium) Q2) Multi-source BFS (LeetCode Medium-Hard) Q3) Googlyness - "Incorporated other's feedback"

ROUND 4 : Technical Round + Googlyness

Q1) Gave Brute Force and a long discussion on various approaches to optimize it and how a particular approach can get wrong was discussed. Q2) Googlyness - "Managing team during tight deadline Q3) Googlyness - "Managing Conflicts" Q4) Googlyness - "Managing different opinions"

Interview Questions (4)

Q1
Incorporating Other's Feedback
Behavioral

Incorporated other's feedback

Q2
Managing Team During Tight Deadline
Behavioral

Managing team during tight deadline

Q3
Managing Conflicts
Behavioral

Managing Conflicts

Q4
Managing Different Opinions
Behavioral

Managing different opinions

Preparation Tips

I solved 1800+ problems across various platforms and had a LeetCode rating of 2000+ during the interview.

|| Google L3 Interview Experience ||
google logo
Google
April 5, 20253 reads

Summary

I recently completed my onsite rounds for a Software Engineer L3 position at Google. I encountered several data structures and algorithms problems, performing well on most, but struggling slightly on a follow-up for one question. I am currently awaiting feedback from the recruiter.

Full Experience

Hi guys,

Recently gave onsite rounds of google, below is the experience:

Phone Screen round:

Create a double ended queue functionalty such as push/pop-front/back, size of double ended queue and printing all elements of queue using only map data structure.
Expected TC was O(1) for all the operations other than priniting of elements.

Got the solution, interviewer seemed statisfied with the solution. Self Verdict -> H/SH

Onsite Round 1

Let's say you have given a list of neighborhood, each neighborhood has different houses in it, e.g {{8,2,9}, {4,6,4}, {4,5,1}}. Respective house color is also given {{'x','r','b'}, {'z', 'r', 'q'}, {'c', 'x', 'a'}}.
We need to return the sorted house order with color attached to it but one condition is that one neighborhood can't have same house number twice in it. Result of above example is: {{'1a','2r','4z'}, {'4q','5x','6r'}, {'4c','8x','9b'}}.
Got the solution, interviewer seemed statisfied with the solution. Self Verdict -> H/SH

Onsite Round 2

Let's say you have a list of words of all dicitonary and we need to find out the 5 words which have length of five and all have unique characters to them. Basically combined 25 unique chars.
Got the solution, interviewer seemed statisfied with the solution. Self Verdict -> H/SH

Onsite Round 3

Let's say you have given a string and list of words. We need to find words that we can make from the given string by deleting chars from string from any position.
Eg:
string: "ozweitosgshg", listOfWords: ["egg", "zoo"]
We can make egg word by deleting chars from the string but not zoo. [Note: We can only delete chars, position of chars can't be changed]

Gave a solution for TC: len(string) * len(listofWords). [Brute Force, wasn't able to think of anything else]

Follow up: Interviewer asked what if we have listOfWords given in the starting and we can preprocess it and then find out the same result.

Wasn't able think of any solution in starting, thought of using TRIE but stuck at how can i use it for traversal with given string. Was having discussion and interviewer was giving few hints inbetween but not able to think how we can do it. Then in last five mins of interview got the idea that:
-> we can use unordered map to store the starting root node of trie for starting chars of each word.
-> Then when traversing through the given string, if we get a node value for that curr char in the map then we will insert the children nodes of that node into the map for respective chars and delete that node from curr char map.
-> when curr node of char reached isEndWord = true (trie struct), then we can find out that this word we can make from string.

Interviewer was statisfied with the solution but as I wasn't able to code it.
Self Verdict -> SNH/NH/LNH [NOT SURE]

Googlyness round

Was asked some standard questions.

Self Verdict -> LH/H

All interviewers were super friendly and supportive.

Waiting for the feeback from the recruiter. Will share here as soon as I get.

Interview Questions (5)

Q1
Implement Deque using Map
Data Structures & Algorithms

Create a double ended queue functionalty such as push/pop-front/back, size of double ended queue and printing all elements of queue using only map data structure. Expected TC was O(1) for all the operations other than printing of elements.

Q2
Sort Houses by Neighborhood with Unique House Numbers
Data Structures & Algorithms

Let's say you have given a list of neighborhood, each neighborhood has different houses in it, e.g {{8,2,9}, {4,6,4}, {4,5,1}}. Respective house color is also given {{'x','r','b'}, {'z', 'r', 'q'}, {'c', 'x', 'a'}}. We need to return the sorted house order with color attached to it but one condition is that one neighborhood can't have same house number twice in it. Result of above example is: {{'1a','2r','4z'}, {'4q','5x','6r'}, {'4c','8x','9b'}}.

Q3
Find 5-Letter Words with Unique Characters
Data Structures & Algorithms

Let's say you have a list of words of all dicitonary and we need to find out the 5 words which have length of five and all have unique characters to them. Basically combined 25 unique chars.

Q4
Form Words by Deleting Characters (with Trie Follow-up)
Data Structures & Algorithms

Let's say you have given a string and list of words. We need to find words that we can make from the given string by deleting chars from string from any position.
Eg:
string: "ozweitosgshg", listOfWords: ["egg", "zoo"]
We can make egg word by deleting chars from the string but not zoo. [Note: We can only delete chars, position of chars can't be changed]

Follow up: Interviewer asked what if we have listOfWords given in the starting and we can preprocess it and then find out the same result.

Q5
Behavioral Questions
Behavioral

Standard behavioral questions were asked.

Google | L5 | round 1 | India
google logo
Google
SDE IIIIndia
April 4, 20254 reads

Summary

I recently had an interview round at Google where I was presented with a very challenging maze problem requiring universal instructions to exit from any starting position, and I derived a solution approach with some interviewer hints.

Full Experience

I gave one round of interview at google last week. I'm not sure what's happening at google because they are asking crazy hard question to people.

Interview Questions (1)

Q1
Universal Maze Instructions
Data Structures & AlgorithmsHard

you are given an NxM maze where each cell is either empty or a wall . There is one cell which is exit from the maze. You are tasked to find a set of universal instructions like DDRLU which applied from any position will make you exit from the maze.

Google | SWE-3 | Interview Questions
google logo
Google
SWE-35 years
April 4, 20253 reads

Summary

I interviewed for a SWE-3 role at Google, completing 3 technical rounds and 1 Googleyness round. The result is not out yet, but I found the interviewers very helpful and plan to prepare strategically for a future attempt.

Full Experience

Experience: 5 Years
Current Company: Mid-size product based company.

I got call through referral. There are 4 rounds for me. 3 technical and 1 Googleyness.

Round-1: Expected Result: Lean Hire

Problem-1: Set Difference of Floating-Point Ranges

You are given two lists of floating-point ranges, a and b. Each list contains zero or more disjoint ranges, represented as pairs [start, end), where start is inclusive and end is exclusive. The ranges within each list are not necessarily sorted.

Your task is to compute the "set difference" of these ranges, specifically a - b. This means you need to find all the segments within the ranges of a that do not overlap with any range in b.

The result should be returned as a list of disjoint ranges, also in the [start, end) format, preferably sorted by their start value.

Example 1: Input: a = [[2.5, 7.5]] b = [[4.3, 9.3]] Output: [[2.5, 4.3]]

Example 2: Input: a = [[2.5, 7.5], [9.0, 10.4]] b = [[4.3, 9.3], [9.5, 11.0]] Output: [[2.5, 4.3], [9.3, 9.5]]

Problem 2: Nth License Plate Generator
An office issues license plates following a specific sequence composed of six distinct patterns concatenated together:
Range 1: 5 digits (00000 to 99999)
Range 2: 1 letter followed by 4 digits (A0000 to Z9999)
Range 3: 2 letters followed by 3 digits (AA000 to ZZ999)
Range 4: 3 letters followed by 2 digits (AAA00 to ZZZ99)
Range 5: 4 letters followed by 1 digit (AAAA0 to ZZZZ9)
Range 6: 5 letters (AAAAA to ZZZZZ)
The sequence starts with 00000, then 00001, ..., up to 99999, immediately followed by A0000, A0001, ..., Z9999, then AA000, and so on, until ZZZZZ. Note that this is not a simple base-36 conversion; the number of letters and digits is fixed within each range (e.g., 12CD5 is invalid).

Write a function getNthLicensePlate(n) that takes a 0-indexed integer n and returns the nth license plate in this sequence as a string.

Example 1:
Input: n = 0
Output: "00000"

Example 2:
Input: n = 1
Output: "00001"

Example 3:
Input: n = 99999
Output: "99999" (Last plate of Range 1)

Example 4:
Input: n = 100000
Output: "A0000" (First plate of Range 2)

Round-2: Expected Result: Lean Hire

Problem: Find Undirected Cycle in Directed Graph 

You are given a directed graph represented by its number of nodes n (labeled from 0 to n-1) and an adjacency list adj.

Your task is to determine if there is a cycle in the graph when considering its edges as undirected. That is, for every directed edge u -> v present in the input, you should treat it as an undirected edge u -- v for the purpose of cycle detection.

If such an undirected cycle exists, return a list of integers representing the nodes in one such cycle. The path should start and end with the same node, and list the nodes in the order they are visited in the cycle. The specific starting node or the direction of traversal (clockwise/counter-clockwise) does not matter, any valid cycle is acceptable.

If no such undirected cycle exists in the graph, return an empty list.

Example 1: Input: n = 4, adj = [[1], [2], [0], []] (Edges: 0->1, 1->2, 2->0) Output: [0, 1, 2, 0] (or [1, 2, 0, 1], etc.) Explanation: Treating edges as undirected (0--1, 1--2, 2--0), the cycle 0-1-2-0 exists.

Example 2: Input: n = 4, adj = [[1], [2], [3], []] (Edges: 0->1, 1->2, 2->3) Output: [] Explanation: Treating edges as undirected (0--1, 1--2, 2--3), the graph forms a line (path), which is acyclic.

Example 3: Input: n = 5, adj = [[1, 2], [3], [], [4], [1]] (Edges: 0->1, 0->2, 1->3, 3->4, 4->1) Output: [1, 3, 4, 1] Explanation: Treating edges as undirected (0--1, 0--2, 1--3, 3->4, 4->1), the cycle 1-3-4-1 exists. Note that node 2 is connected but not part of this cycle.

Example 4: Input: n = 3, adj = [[], [0], [1]] (Edges: 1->0, 2->1) Output: [] Explanation: Undirected edges are 1--0 and 2--1. This forms the path 0--1--2, which has no cycles.

Round-3: Expected Result: Strong Hire

Title: Simplify Algebraic Expression With Parentheses

You are given a string formula representing a mathematical expression. The expression consists of:

Lowercase English letters ('a' through 'z') representing variables. Addition ('+') and subtraction ('-') operators. Parentheses ('(' and ')'). Each variable implicitly has a coefficient of 1. Your task is to simplify the given formula by removing all parentheses and combining like terms, producing an equivalent expression.

The resulting expression should follow these rules:

Terms should be ordered alphabetically by variable name. Each variable should appear at most once. Coefficients of 1 should be omitted (e.g., a instead of 1a). Coefficients of -1 should be represented only by the minus sign (e.g., -b instead of -1b). Terms should be joined by + or - signs as appropriate. Do not include a leading + sign. If the simplified expression evaluates to zero (all terms cancel out), return "0". Input:

formula: A string representing the algebraic expression. Output:

A string representing the simplified algebraic expression according to the rules above.

Example 1: Input: formula = "a-(b+c)" Output: "a-b-c" Explanation: The parentheses are removed, distributing the minus sign: a - b - c. Terms are already sorted.

Example 2: Input: formula = "a-(a-b)" Output: "b" Explanation: a - a + b. The a terms cancel out, leaving b.

Example 3: Input: formula = "(a+b)-(c-d)" Output: "a+b-c+d" Explanation: a + b - c + d.

Example 4: Input: formula = "a-(b-(c+a))" Output: "2a-b+c" Explanation: a - (b - c - a) -> a - b + c + a. Combining like terms gives 2a - b + c. Sorting gives the same result. (Self-correction: Original examples didn't explicitly show coefficients other than 1/-1. Added this example to clarify combining terms like a+a -> 2a). Let's refine the rules slightly based on this - coefficients are needed if > 1 or < -1. The original prompt implied only +/- 1 coefficients. Assuming the user meant full simplification including combining terms:

Round-4: Expected Result: Strong Hire

Basic behavioural questions. 
Nothing complex, just be honest and make sure your communication is good and on point.

Result is not out yet.

Interviewers are very helpful and push your limits. Probably I wont make it to google this time but this is very good interview experience for me and next i will prepare strategically from this experience and will try again. Keep grinding.

Interview Questions (4)

Q1
Set Difference of Floating-Point Ranges
Data Structures & Algorithms
Problem-1: Set Difference of Floating-Point Ranges

You are given two lists of floating-point ranges, a and b. Each list contains zero or more disjoint ranges, represented as pairs [start, end), where start is inclusive and end is exclusive. The ranges within each list are not necessarily sorted.

Your task is to compute the "set difference" of these ranges, specifically a - b. This means you need to find all the segments within the ranges of a that do not overlap with any range in b.

The result should be returned as a list of disjoint ranges, also in the [start, end) format, preferably sorted by their start value.

Example 1:
Input:
a = [[2.5, 7.5]]
b = [[4.3, 9.3]]
Output: [[2.5, 4.3]]

Example 2:
Input:
a = [[2.5, 7.5], [9.0, 10.4]]
b = [[4.3, 9.3], [9.5, 11.0]]
Output: [[2.5, 4.3], [9.3, 9.5]]
Q2
Nth License Plate Generator
Data Structures & Algorithms
Problem 2: Nth License Plate Generator
An office issues license plates following a specific sequence composed of six distinct patterns concatenated together:
Range 1: 5 digits (00000 to 99999)
Range 2: 1 letter followed by 4 digits (A0000 to Z9999)
Range 3: 2 letters followed by 3 digits (AA000 to ZZ999)
Range 4: 3 letters followed by 2 digits (AAA00 to ZZZ99)
Range 5: 4 letters followed by 1 digit (AAAA0 to ZZZZ9)
Range 6: 5 letters (AAAAA to ZZZZZ)
The sequence starts with 00000, then 00001, ..., up to 99999, immediately followed by A0000, A0001, ..., Z9999, then AA000, and so on, until ZZZZZ. Note that this is not a simple base-36 conversion; the number of letters and digits is fixed within each range (e.g., 12CD5 is invalid).

Write a function getNthLicensePlate(n) that takes a 0-indexed integer n and returns the nth license plate in this sequence as a string.

Example 1:
Input: n = 0
Output: "00000"

Example 2:
Input: n = 1
Output: "00001"

Example 3:
Input: n = 99999
Output: "99999" (Last plate of Range 1)

Example 4:
Input: n = 100000
Output: "A0000" (First plate of Range 2)
Q3
Find Undirected Cycle in Directed Graph
Data Structures & Algorithms
Problem: Find Undirected Cycle in Directed Graph 

You are given a directed graph represented by its number of nodes n (labeled from 0 to n-1) and an adjacency list adj.

Your task is to determine if there is a cycle in the graph when considering its edges as undirected. That is, for every directed edge u -> v present in the input, you should treat it as an undirected edge u -- v for the purpose of cycle detection.

If such an undirected cycle exists, return a list of integers representing the nodes in one such cycle. The path should start and end with the same node, and list the nodes in the order they are visited in the cycle. The specific starting node or the direction of traversal (clockwise/counter-clockwise) does not matter, any valid cycle is acceptable.

If no such undirected cycle exists in the graph, return an empty list.

Example 1:
Input: n = 4, adj = [[1], [2], [0], []] (Edges: 0->1, 1->2, 2->0)
Output: [0, 1, 2, 0] (or [1, 2, 0, 1], etc.)
Explanation: Treating edges as undirected (0--1, 1--2, 2--0), the cycle 0-1-2-0 exists.

Example 2:
Input: n = 4, adj = [[1], [2], [3], []] (Edges: 0->1, 1->2, 2->3)
Output: []
Explanation: Treating edges as undirected (0--1, 1--2, 2--3), the graph forms a line (path), which is acyclic.

Example 3:
Input: n = 5, adj = [[1, 2], [3], [], [4], [1]] (Edges: 0->1, 0->2, 1->3, 3->4, 4->1)
Output: [1, 3, 4, 1]
Explanation: Treating edges as undirected (0--1, 0--2, 1--3, 3->4, 4->1), the cycle 1-3-4-1 exists. Note that node 2 is connected but not part of this cycle.

Example 4:
Input: n = 3, adj = [[], [0], [1]] (Edges: 1->0, 2->1)
Output: []
Explanation: Undirected edges are 1--0 and 2--1. This forms the path 0--1--2, which has no cycles.
Q4
Simplify Algebraic Expression With Parentheses
Data Structures & Algorithms
Title: Simplify Algebraic Expression With Parentheses

You are given a string formula representing a mathematical expression. The expression consists of:

Lowercase English letters ('a' through 'z') representing variables.
Addition ('+') and subtraction ('-') operators.
Parentheses ('(' and ')').
Each variable implicitly has a coefficient of 1. Your task is to simplify the given formula by removing all parentheses and combining like terms, producing an equivalent expression.

The resulting expression should follow these rules:

Terms should be ordered alphabetically by variable name.
Each variable should appear at most once.
Coefficients of 1 should be omitted (e.g., a instead of 1a).
Coefficients of -1 should be represented only by the minus sign (e.g., -b instead of -1b).
Terms should be joined by + or - signs as appropriate. Do not include a leading + sign.
If the simplified expression evaluates to zero (all terms cancel out), return "0".
Input:

formula: A string representing the algebraic expression.
Output:

A string representing the simplified algebraic expression according to the rules above.

Example 1:
Input: formula = "a-(b+c)"
Output: "a-b-c"
Explanation: The parentheses are removed, distributing the minus sign: a - b - c. Terms are already sorted.

Example 2:
Input: formula = "a-(a-b)"
Output: "b"
Explanation: a - a + b. The a terms cancel out, leaving b.

Example 3:
Input: formula = "(a+b)-(c-d)"
Output: "a+b-c+d"
Explanation: a + b - c + d.

Example 4:
Input: formula = "a-(b-(c+a))"
Output: "2a-b+c"
Explanation: a - (b - c - a) -> a - b + c + a. Combining like terms gives 2a - b + c. Sorting gives the same result. (Self-correction: Original examples didn't explicitly show coefficients other than 1/-1. Added this example to clarify combining terms like a+a -> 2a). Let's refine the rules slightly based on this - coefficients are needed if > 1 or < -1. The original prompt implied only +/- 1 coefficients. Assuming the user meant full simplification including combining terms:

Preparation Tips

Do not just focus on DP or graphs if you are preparing for google. Try to solve Hard problems from variety of concepts. Cover Math, greedy, bit manipulation etc. Do not ignore any topic.

Google India phone screen round (L3)
google logo
Google
SDE IIndia
April 4, 20254 reads

Summary

I had a phone screen round with Google India for an L3 role where I was asked a hard graph problem. My proposed solution's time complexity was not entirely satisfactory to the interviewer, leading to uncertainty about progressing to further rounds.

Full Experience

I was asked the question https://leetcode.com/problems/minimum-weighted-subgraph-with-the-required-paths/description/ in google phone screening round. I have given the solution with time complexity O(V^4log(V)) and the interviewer is not completely satisifed as it can be done in O(E(log(v))). Any chances of getting shortlisted for the further rounds

Interview Questions (1)

Q1
Minimum Weighted Subgraph With the Required Paths
Data Structures & Algorithms

The problem discussed was 'Minimum Weighted Subgraph With the Required Paths', linked at https://leetcode.com/problems/minimum-weighted-subgraph-with-the-required-paths/description/.

Phone Screen Round for L4
google logo
Google
SDE II
April 3, 20253 reads

Summary

I had a phone screen round for Google L4, where I was asked a challenging log message truncation problem which I approached using binary search to find the optimal 'X'.

Full Experience

I have given my phone screen round for Google today so the question goes like this there is some story written which is of no use Now the main part we will be given a list of log messages from different sources and we have to truncate those log messages based two conditions

  1. If the number of log messages emiited from any source is more than X then we have to truncate them to X messages
  2. If the number of log messages emiited from any source is less than equal X then we have to truncate all of them

Now we have to find a maximum value of X such that after truncation the total truncated messages is max_size or fewer. And print the trucated list

Solution:

  1. Solve this using binary search to find the maximum value of X and then print the first X messages of every source
  2. Maximum value of X is 1 in this case
  3. size of list of log message = 1E5
  4. Solution Link: https://onlinegdb.com/8tmxh46Av

Ex:

Struct LogMessage{
   string source;
   string content
};

vector<LogMessage>logMessages = {
    {source_a, m},
    {source_a, m},
    {source_b, m}
};

max_size = 2;

After truncation -->  vector<LogMesaage> trucatedList = { {source_a, m}, {source_b, m} }

Interview Questions (1)

Q1
Log Message Truncation with Max Size
Data Structures & Algorithms

We will be given a list of log messages from different sources and we have to truncate those log messages based two conditions:

  1. If the number of log messages emitted from any source is more than X then we have to truncate them to X messages.
  2. If the number of log messages emitted from any source is less than or equal to X then we have to truncate all of them.

Now we have to find a maximum value of X such that after truncation the total truncated messages is max_size or fewer. And print the truncated list.

Example:

Struct LogMessage{
   string source;
   string content
};

vector<LogMessage>logMessages = {
    {source_a, m},
    {source_a, m},
    {source_b, m}
};

max_size = 2;

After truncation -->  vector<LogMesaage> trucatedList = { {source_a, m}, {source_b, m} }
Google L3 interview Experience (onsite)
google logo
Google
SDE IOnsite
April 3, 20259 reads

Summary

I underwent a Google L3 onsite interview which included multiple Data Structures & Algorithms and behavioral rounds. Despite mixed feedback, including a negative on one DSA round, my recruiter is forwarding my packet, though I perceive the chances of selection as low.

Full Experience

Feedback as per recruiter

Onsite Round 1(DSA)- Variation of https://leetcode.com/problems/split-array-largest-sum/description/
Feedback - negative

Onsite Round 2 (DSA)- Variation of https://leetcode.com/problems/course-schedule-ii/
Feedback - Positive

Onsite Round 3 (DSA) -Variation of https://leetcode.com/problems/number-of-visible-people-in-a-queue/description/
Feedback - Weak Positive

Onsite Round 4- (Googliness) - About me and some grinding on resume.

Questions - Tell me how will you arrange offsite for team and handle conflicts within team on which activities to do during offsite?

What if you are working with some cross team to build a tool and your manager is not happy with that. How will you handle that?

Tell me a time when you made some things/tools for which you got appreciation from the entire team?

Any leadership example wherein you distributed work among your team and got great results?
Feedback - Positive

I am not considering chances of getting through as even one negative doesnt look good on packet. Although recruiter has told me that they are sending my packet ahead but chances are low or maybe one more round if any hm shows interest.

Thanks.

Interview Questions (7)

Q1
Split Array Largest Sum (Variation)
Data Structures & AlgorithmsHard

A variation of the Split Array Largest Sum problem.

Q2
Course Schedule II (Variation)
Data Structures & AlgorithmsMedium

A variation of the Course Schedule II problem.

Q3
Number of Visible People in a Queue (Variation)
Data Structures & AlgorithmsHard

A variation of the Number of Visible People in a Queue problem.

Q4
Team Offsite Arrangement and Conflict Resolution
Behavioral

Tell me how will you arrange offsite for team and handle conflicts within team on which activities to do during offsite?

Q5
Manager Disapproval of Cross-Team Collaboration
Behavioral

What if you are working with some cross team to build a tool and your manager is not happy with that. How will you handle that?

Q6
Tools/Initiatives Leading to Team Appreciation
Behavioral

Tell me a time when you made some things/tools for which you got appreciation from the entire team?

Q7
Leadership Example of Work Distribution for Great Results
Behavioral

Any leadership example wherein you distributed work among your team and got great results?

Weird Google Interview Experience | Bangalore SDE II (L4) | Reject
google logo
Google
SDE II (L4)Bangalore5 years
April 2, 20255 reads

Summary

I had a disappointing Google SDE II interview experience in Bangalore, where the interviewer seemed distracted and potentially biased, leading to a "Neutral" feedback and a 12-month cool-off despite my strong preparation and confidence in my solution.

Full Experience

Was interviewed for L4 loop at Google and since was my first experience I got a Mock interview as well. This was pretty helpful to see how it would look like. Here is the experience: Google Mock Interview

Then I got the first on-site and it began at a bad note. The interviewer joined in and seemed distracted, so I went ahead and introduced myself and they stopped in middle to ask me "I though you're from [FAANG] currently. I clarified that I used to work there and have been at new place for about 2 years now.

The interviewer seemed to believe at the point that I shared the incorrect Resume deliberately which I clarified that I was asked for my Resume and gave latest one, I had no idea how they got such an old Resume (Even recruiter clarified that it was latest).

Following that, intervier did not even introduce themself and just pasted they question and said "Solve this", then went back to do something else and again seemed distracted.

This was the question: Google Onsite

At first I started explaining on how we traverse for finding cycle, and in a similar fashion dfs would help us print the ring and was interuppted to say, "No, its not to find a cycle but to print ring aren't you seeing the question". All subsequest attempt at discussion of my thinking process was met with some berating comment but I still kept my calm and did my best.

Below was the code I did.

  private static List<String> findRing(Map<String, List<String>> graph) {
    String node = graph.keySet().iterator().next();
    List<String> result = dfs(graph, node, null, node);
    return result;
  }
  
   private static List<String> dfs(Map<String, List<String>> graph, String node, String prev, String startingNode) {
     if(node == startingNode && startingNode != prev && prev != null) {
       return new ArrayList<>();
     }
     
     for(String next : graph.get(node)) {
       if(next != prev) {
          List<String> list = dfs(graph, next, node, startingNode);
         // Visit only once
          if(list != null) {
            list.add(node);
             return list;
          }

       }
     }
     return null;
   } 
}

On this part I was told multiple times "Make it look better", "Do something to make it better" and honestly felt I was talking to ChatGPT 🥲

I explained on this part as much as I could, but was told to improve this approach so could not discuss any other approaches (like BFS, which would be even better here)

Then after a few days I got my feedback that I got "Neutral" feedback and interviewer mentioned that I missed a lot of edge cases and did not properly debug the code so don't move forward. This was so disheartening since the code I had even on dry run had no bugs (even confirmed during interview), and I covered all edge cases! To top that, I got a 12-month cool-off.

I explained to recruiter that it might have a little bias since interviewer believed I shared wrong resume intentionally, and the feedback does not seem to what actually happened. We could either get the feedback once again or since it a neutral feedback we could go for atleast 1 more round to decide, apart from that the 12 month was alot for neutral feedback since I already have 5 years experience and was really prepared for interviews (I prepared for Google for over a month). Recruiter said nothing could be done and just share feedback over mail.

Interview Questions (1)

Q1
Find and Print Ring in a Graph
Data Structures & Algorithms

Given a graph, I was asked to solve a problem that the interviewer clarified was not about finding a cycle, but specifically about printing a ring in the graph.

Preparation Tips

I prepared for Google for over a month.

Google Mock Interview Experience | Bangalore SDE II (L4)
google logo
Google
SDE II (L4)Bangalore
April 2, 20255 reads

Summary

I had a Google mock interview for an SDE II (L4) role in Bangalore. The session focused on a core graph problem concerning organizational structure and employee scores, followed by two challenging follow-up questions on efficiently recomputing scores after individual or subtree team movements.

Full Experience

Question

Suppose you have a graph of organizational structure where each node N corresponds to a person

  • If N reports to M, then M is the parent of N
  • If P reports to N, P is the child of N

Someone's "employee score" is the total number of reports (including themselves) and you have to write a function to compute anyone's employee score.

So it was pretty basic graph question where we could store empployee in graph and then calculate score for any Node. We discussed a bit and finalised on a structure to store employee and focus on calculating for one employee.

class Employee {
	int id;
	String name;
	List<Employee> reportees;
}

Map<Integer, Employee> graph;

int calculateScore(Employee employee) {
	int score = 1;
	for(Employee reportee : employee.getReportees()) {
            score += calculateScore(reportee);
    }
    return score;
}

Follow up 1

Suppose the graph has already been precomputed with everyone's employee score. Write a function to recompute these employee scores should someone move teams.

  • Assume that if an individual moves teams, their reports do not move with them, and simply start directly reporting to an individual's former boss.
  • Assume that a function to perform the actual team movement already exists, and the new children / parent of this node have been updated accordingly.

We discussed this and made the strcture better to store not just employees but their score too. Then a reference to whom they report and when updating any score, we can simply propagate upwards.

class Employee {
	int id;
	String name;
	List<Employee> reportees;
	Employee reportingTo;
	int score = 1;
}


void cascadeScore(Employee employee, int score) {
	if(employee == null) {
        return; 
    }
    employee.setScore(employee.getScore() - score);
    cascadeScore(employee.getReportingTo(), score);
}

void removeEmployee(Employee employee) {
    // Moved children
	cascadeScore(employee.getReportingTo(), -1);
    employee.setReportingTo(null);
    employee.setScore(1);
}

void addEmployee(Employee employee, Employee reportingTo) {
	reportingTo.add(employee);
	employee.setReportingTo(reportingTo);
	cascadeScore(employee.getReportingTo(), 1);
}

void moveEmployee(Employee employee, Employee newReport) {
    removeEmployee(employee);
    addEmployee(employee, newReport);
}

Follow up 2

Same as 1st followup, but instead of an individual moving teams write a function to recompute employee scores in the event of a reorganization: that is, have an employee and everyone underneath them move teams.

This was a simple change as well, were we just reorganise the graph.

void cascadeScore(Employee employee, int score) {
	if(employee == null) {
        return; 
    }
    employee.setScore(employee.getScore() - score);
    cascadeScore(employee.getReportingTo(), score);
}

void removeEmployee(Employee employee) {
	cascadeScore(employee.getReportingTo(), -employee.getScore());
    employee.setReportingTo(null);
}

void addEmployee(Employee employee, Employee reportingTo, int score) {
	reportingTo.add(employee);
	employee.setReportingTo(reportingTo);
	cascadeScore(employee.getReportingTo(), score);
}

void moveEmployee(Employee employee, Employee newReport, boolean reorg) {
    if(regorg) {
        removeEmployee(employee);
    }
    addEmployee(employee, newReport, employee.getScore());
}

Interview Questions (3)

Q1
Employee Score in Organizational Graph
Data Structures & Algorithms

Suppose you have a graph of organizational structure where each node N corresponds to a person

  • If N reports to M, then M is the parent of N
  • If P reports to N, P is the child of N

Someone's "employee score" is the total number of reports (including themselves) and you have to write a function to compute anyone's employee score.

Q2
Recompute Employee Scores on Individual Team Move
Data Structures & Algorithms

Suppose the graph has already been precomputed with everyone's employee score. Write a function to recompute these employee scores should someone move teams.

  • Assume that if an individual moves teams, their reports do not move with them, and simply start directly reporting to an individual's former boss.
  • Assume that a function to perform the actual team movement already exists, and the new children / parent of this node have been updated accordingly.
Q3
Recompute Employee Scores on Team Reorganization (Subtree Move)
Data Structures & Algorithms

Same as 1st followup, but instead of an individual moving teams write a function to recompute employee scores in the event of a reorganization: that is, have an employee and everyone underneath them move teams.

Google L4 Journey
google logo
Google
SDE II
April 1, 20253 reads

Summary

I successfully navigated my Google L4 interview process, receiving positive feedback across all phone screen and onsite rounds, ultimately culminating in an offer.

Full Experience

Hi, I'm currently in the interview process for Google L4.

Applied (T0)

After each round, I've received email from the recruiter that the round went positive.

Phone Screen (T + 7days)

Recruiter said: Positive
I say: Strong Hire (Maybe its just yes/no for phone screen. It was a question involving Dijkstra algo)

Onsite Round 1 - DSA (T + 38days)

Recruiter said: Positive
I say: Strong Hire (Came up with most optimal sol, modular code, interviewer was happy. Question was around identifying binary search space and finding the most optimal value)

Onsite Round 2 - DSA (T + 42days)

Recruiter said: Positive
I say: Strong Hire (1 Medium + 1 Follow up around hashmap, explained and coded. 1 Hard involving topological sort & minimum time to complete tasks with constraints. Explained and coded and was almost out of time towards the end due to number of questions but the interviewer was very satisfied)

Onsite Round 3 - Googleyness & Leadership (T + 43days)

Recruiter said: Positive
I say: Strong Hire (Interviewer was in a good mood. Told me he wanted me to pass. Asked me 5-6 behavioural questions. I had prepared well, so answered them & he was responding well with my responses. Post interview, he closed the laptop and we chatted for about 20 minutes around our past experiences)

Onsite Round 4 - DSA (T + 50days)

Recruiter said: Positive
I say: Strong Hire. What a streak in my mind 🤯. The question was similar to lowest k elements in a sorted row and column matrix with a few follow ups.

Team Fit Call (T + 59days)

Recruiter said: Good Match
I say: Good match. Had a call with hiring manager for the team I was being considered for. At the end of the call, manager said its a good match directly to me. After an hour, recruiter delivered the same feedback and they're moving with getting all the approvals.

Offer Rollout (T + 68days)

Recruiter said: Congratulations!
I said: Thank you!

Compensation Post: https://leetcode.com/discuss/post/6671007/google-sde-2-l4-bangalore-by-anonymous_u-p12n/

Interview Questions (3)

Q1
Minimum Time to Complete Tasks with Constraints using Topological Sort
Data Structures & AlgorithmsHard

A hard problem involving topological sort to find the minimum time to complete tasks, considering various constraints.

Q2
Behavioral Questions for Google L4 (Googleyness & Leadership)
Behavioral

The interviewer asked 5-6 behavioral questions related to Googleyness and Leadership traits.

Q3
Lowest K Elements in Sorted Row/Column Matrix
Data Structures & Algorithms

A problem similar to finding the lowest k elements in a matrix where rows and columns are sorted, with a few follow-up questions.

Google Phone Screen || L4 || 14 Mar 2025
google logo
Google
SDE IIOngoing
March 16, 202547 reads

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)

Q1
Maximum Nesting Level of Rectangles
Data Structures & AlgorithmsHard

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.

Google L5 Interview | January 2025
google logo
Google
SDE III
March 11, 202561 reads

Summary

I appeared for a Google L5 interview in January 2025 and was asked a series of challenging Data Structures & Algorithms questions across multiple rounds, including scheduling, graph theory, and range management problems.

Full Experience

I appeared for Google L5 interview in January 2025. I was asked a series of challenging questions across three rounds. The first round involved a scheduling problem to determine worker presence during time intervals. The second round focused on graph theory, specifically finding a root to convert an acyclic graph into a binary tree, with complex follow-ups involving color-alternating and sequence-following layers. The third round was based on the LeetCode Range Module problem, with variations on the query part.

Interview Questions (3)

Q1
Worker Shift Schedule
Data Structures & AlgorithmsMedium

You are given a list of worker shifts, where each shift is represented as a list [name, start, end]. The name is a string representing the worker's name, start is an integer representing the start time of the shift, and end is an integer representing the end time of the shift. The goal is to generate a schedule that shows the intervals of time and the workers present during each interval.

Example:
Given the input:
[["Abby", 10, 100], ["Ben", 50, 70], ["Carla", 60, 70], ["David", 120, 300]]

The output should be:
[[10, 50, ["Abby"]], [50, 60, ["Abby", "Ben"]], [60, 70, ["Abby", "Ben", "Carla"]], [70, 100, ["Abby"]], [120, 300, ["David"]]]

Q2
Convert Graph to Binary Tree with Color Constraints
Data Structures & AlgorithmsHard

Given an undirected acyclic connected graph where each node has at most 3 edges, find a node which, when made the root, converts the graph into a binary tree.

Follow-up 1:
The nodes are colored Black or White, find a root such that:

  • The graph becomes a binary tree.
  • The tree alternates in color across layers (e.g., Depth 0: White, Depth 1: Black, Depth 2: White, etc.).

Either White or Black can be the starting color.

Follow-up 2:
The nodes are colored Red (R), Blue (B), or White (W), find a root such that:

  • The graph becomes a binary tree.
  • The layers of the tree follow a fixed color sequence e.g., RBWRBW… or BWRBWR… or WRBWRB).
Q3
Range Module with Single Value and Range Queries
Data Structures & AlgorithmsHard

The third round question was Range Module.

The initial query part involved a single value instead of a range.

Follow-up: The query part was then extended to a range.

Google Phone Screening Round Interview Experience [India]
google logo
Google
Software EngineerBangalore, IndiaOngoing
March 11, 202533 reads

Summary

I recently had a phone screen interview for a Software Engineer role at Google India, Bangalore. I was asked a backtracking problem similar to 'Generate Parentheses', but I couldn't complete the code within the time limit due to a lack of confidence and experience. I am currently awaiting feedback on my performance.

Full Experience

I recently had the incredible opportunity to interview for a Software Engineer role at Google India, Bangalore. My journey began when a recruiter reached out via email regarding an open position. Being an aspiring FAANG candidate, I quickly responded with my updated CV and scheduled an introductory call.

The recruiter call, conducted over Google Meet, lasted about 20 minutes. We discussed my resume, focusing on my full-time experience and frontend-heavy skill set. The recruiter then detailed the interview process, emphasizing that all rounds would be DSA-focused, not domain-specific.

Initially, I was offered two weeks to prepare, but I requested three weeks as I needed to start from scratch with DSA, having primarily worked on frontend technologies.

For my first phone screen interview, I was asked a problem similar to "Generate Parentheses". Luckily, I had practiced this backtracking problem before. However, due to a lack of interview experience and confidence in backtracking, I second-guessed my approach and couldn’t complete the code within the allotted time.

An important note: Google's coding interview platform is a blank page without auto-suggestions, syntax highlighting, or debugging tools. Being comfortable coding in a plain text environment is crucial, and something I need to improve on.

Currently, I'm in the waiting phase for feedback, fingers crossed!

My Key Takeaways:

  • Confidence matters: Even with a known solution, self-doubt can hinder performance.
  • Time management: Practicing under timed conditions is essential.
  • Clear communication: Articulating my thought process effectively is vital.
  • Plain text coding: I need to get comfortable coding without IDE features.

Regardless of the outcome, this experience has been a valuable learning opportunity, and I'm committed to continuous improvement.

Interview Questions (1)

Q1
Generate Parentheses
Data Structures & AlgorithmsMedium

Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.

Preparation Tips

During my three weeks of preparation, I strategically focused on areas where I felt less confident but knew were crucial for Google interviews:

  • Graph algorithms
  • Dynamic Programming (DP)
  • Backtracking

I dedicated my time to these topics because I recognized my weaknesses there and understood their significance in competitive programming and technical interviews.

Google L5 interview Experience (rejected)
google logo
Google
SDE IIIRejected
March 1, 202576 reads

Summary

I recently interviewed for an L5 Staff Software Engineer role at Google. Despite putting in significant preparation and clearing the initial rounds, I was ultimately rejected after struggling with the second onsite technical interview. I'm sharing my experience and the specific questions I faced to help others preparing for similar roles.

Full Experience

I've been practicing Data Structures and Algorithms for about three years, always hoping for an opportunity at Google. My resume often got rejected, but in November, my wish came true when a Google recruiter contacted me via LinkedIn for interview rounds.

Phone Screen

This round involved a Dynamic Programming problem. I don't recall the exact question, but it was similar to finding the size of the largest identical binary tree subtree within a given tree. I successfully solved it by applying DP memoization to reuse results from already computed subtrees, which helped me clear this round.

Two days later, the recruiter informed me I was on the borderline, with a "leaning Hire" assessment, and I proceeded to the Onsite rounds. I took a month to prepare for these, focusing on Google assessment contests on LeetCode, daily and weekly problems, and Google's previously tagged questions from the last three months. I felt confident, but I was wrong!

Onsite Round 1 (February 2025)

The interviewer presented a unique problem. There was a lot of confusion and discussion between us during this round. However, I managed to successfully code the solution correctly at the very last moment, which I believe saved me. The recruiter ultimately gave me a "Leaning No Hire" feedback.

Despite the "Leaning No Hire", my recruiter remained positive because I had coded the problem correctly, and I was advanced to the second Onsite round.

Onsite Round 2

This round was incredibly tough, and I felt completely overwhelmed. The interviewer grilled me, and I couldn't get anywhere near an optimized solution. I did manage to code a brute force solution, which was O(N^2), but the recruiter was clearly not happy with it.

Before that main question, he asked a simpler one: to choose a root in the given graph to form a valid binary tree, ignoring colors. After a hint, I quickly realized any node with a degree less than or equal to 2 would work and coded it fast. Then came the main challenge with the alternating colors, where my brute-force DFS approach for each node to check alternating patterns was not what they wanted for an O(N) solution.

The next day, the interviewer called to deliver the bad news: the review was not positive, resulting in a "No Hire." My third round didn't even happen. The recruiter advised me to prepare further and reach out again in six months. Overall, despite the rejection, it was a very good learning experience.

Interview Questions (3)

Q1
Extend Rhyme Scheme
Data Structures & Algorithms

Please write a function that takes two rhyme schemes, one short and one long, and, if possible, extends the short one to make them equivalent.

Examples:

  • ABB, ABBBA -> ABBBA
  • DEE, ABBBA -> DEEED
  • AAB, OORRQQ -> AABBCC (or AABBDD, etc.)
  • ABB, OORRQQ has no valid extension
Q2
Root for Valid Binary Tree
Data Structures & Algorithms

Given an undirected acyclic graph where each node has at most 3 edges. Without considering node colors, choose a root such that the graph forms a valid binary tree when rooted at this node.

Q3
Alternating Color Binary Tree Root
Data Structures & Algorithms

Given an undirected acyclic graph where each node has at most 3 edges. You are also given a color list containing the color of each node (Black or White).

You need to find a root such that:

  1. It forms a valid Binary tree when rooted at this node.
  2. It forms an alternating color pattern (e.g., BWBW or WBWB) across its levels.

Preparation Tips

For my initial phone screen, I had already built a strong foundation, having practiced Data Structures and Algorithms consistently for about three years.

Before the onsite rounds, I dedicated a full month to intensive preparation. My strategy included:

  • Solving all the Google assessment contests available on LeetCode.
  • Consistently tackling daily and weekly LeetCode problems.
  • Participating in LeetCode contests.
  • Focusing specifically on Google's previously tagged questions from the last three months on LeetCode.

I felt confident with this preparation, but the onsite experience proved to be more challenging than expected.

Google | SE-3 | Interview Experience India | 4.8+ Y.O.Exp. | Current Org. MNC
google logo
Google
SE-3India4.8 yearsOngoing
February 17, 202534 reads

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)

Q1
Find Max/Min from a Stream (Configurable Top K)
Data Structures & AlgorithmsMedium

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.

Google | L4 | Hyderabad | Jan 2025 [Offer]
google logo
Google
SDE IIhyderabad4 yearsOffer
February 15, 202545 reads

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)

Q1
Evaluate Expression (Stack Variation)
Data Structures & Algorithms

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.

Google | L4 | Bengaluru | Jan 2025 | Offer
google logo
Google
SWE-IIIbengaluru4 yearsOffer
February 15, 202557 reads

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)

Q1
Run-Length Encoding (RLE) Class Design
Data Structures & Algorithms

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.

Q2
Graph Traversal (Similar to LeetCode 200)
Data Structures & Algorithms

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.

Q3
Word Ladder (Similar to LeetCode 127)
Data Structures & Algorithms

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.

Q4
Modified CPU Scheduling with Optimization
Data Structures & Algorithms

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.

Google | L3 | Interview Experience | Ghosted by Recruiter
google logo
Google
SDE I2 yearsNo Offer
February 1, 202548 reads

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)

Q1
Router Path Existence with Minimum Distance and Inactive Visited Nodes
Data Structures & AlgorithmsHard

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.

Google | L5 | Bangalore | Selected | Interview Experience
google logo
Google
l5 software engineerbangalore5.5 yearsOffer
January 30, 202564 reads

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)

Q1
Huffman Coding Algorithm
Data Structures & Algorithms

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.

Q2
Org Structure Modification
Data Structures & AlgorithmsEasy

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?

Q3
Design a Distributed Cache
System Design

Design a distributed cache optimized for a given task (details of the task were presented on screen).

Q4
Design TikTok-style Google News Feed
System Design

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.

Google | Software Engineer, University Graduate | [Result: Rejected]
google logo
Google
Software Engineer, University GraduateRejected
January 22, 202549 reads

Summary

I interviewed with Google for a Software Engineer, University Graduate role for the 2025 cohort and unfortunately received a rejection after multiple challenging technical and Googliness rounds. Despite the outcome, the entire experience was incredibly valuable, teaching me resilience and enhancing my problem-solving skills.

Full Experience

My journey interviewing with Google for the Software Engineer, University Graduate position for 2025 has been quite an experience. As a final year B.Tech CSE student, I approached this off-campus opportunity with a mix of excitement and apprehension.

The interview process kicked off with Round 1: DSA on November 11, 2024. This 1-hour round included two problems. The first question challenged me to find a node in a graph that could serve as the root of a tree, which really tested my understanding of graph traversal. The second problem asked me to determine if the levels of a tree were alternately colored, demanding clear logic and a solid grasp of tree properties.

Round 2: DSA followed on November 25, 2024, another 1-hour session. Here, I was presented with a problem where, given match outcomes between 'n' players, I had to determine if a precise ranking of all players was possible. This was a classic graph theory problem focusing on dependencies and ordering.

Round 3: DSA + Googliness took place on December 16, 2024. This round was 45 minutes for DSA and 15 minutes for Googliness. The DSA question involved allocating rooms to interns in an apartment based on their preferences to maximize the number of satisfied interns, a combinatorial optimization challenge.

Finally, Round 4: DSA + Googliness was on January 13, 2025, with the same 45/15 minute split. The technical question here was intriguing: given a rectangular PCB board with 'n' components, I needed to find the maximum number of components that could be touched by a single straight line, either horizontal or vertical. This required analytical and geometric reasoning.

After waiting for about a week post the final round, I received the news: I was rejected. While the outcome wasn't what I had hoped for, this entire experience has been incredibly valuable. It taught me a lot about resilience, problem-solving under pressure, and the absolute importance of thorough preparation. It has only fueled my determination to work harder and come back stronger in my next endeavors. I truly believe that every setback is a stepping stone to success.

Interview Questions (5)

Q1
Find Tree Root in Graph
Data Structures & Algorithms

Find the node in a graph that could act as the root of a tree. This problem tested my understanding of graph traversal techniques.

Q2
Alternately Colored Tree Levels
Data Structures & Algorithms

Determine if the levels of a tree were alternately colored. This required logic and a clear grasp of tree properties.

Q3
Rank Players from Match Outcomes
Data Structures & Algorithms

Given match outcomes between n players, determine if it’s possible to rank all players precisely. This graph theory problem revolved around dependencies and ordering.

Q4
Maximize Satisfied Interns with Room Allocation
Data Structures & Algorithms

Allocate rooms to interns in an apartment based on their preferences to maximize the number of satisfied interns. This required solving a combinatorial optimization problem.

Q5
Max Components Touched by Straight Line on PCB
Data Structures & Algorithms

Given a rectangular PCB board with n components, find the maximum number of components that can be touched by a single straight line (horizontal or vertical). This required analytical and geometric reasoning.

My Google Summer Internship Experience (Off-Campus Application)
google logo
Google
Summer InternshipRejected
January 15, 202537 reads

Summary

I underwent a Google Summer Internship interview process, which included a technical round featuring a variation of the 'Buy and Sell Stock' problem. Despite my clear approach, I faced challenges with implementation under time pressure and technical issues, leading to a rejection.

Full Experience

My journey began with an off-campus application for the Google Summer Internship 2026 Batch. I made sure my resume and profile were well-polished and aligned with the role's requirements. Shortly after applying, I received an email notifying me that I had been shortlisted.

Resume Screening Round:
I participated in a 20-minute resume screening session where the interviewer inquired about my projects, highlighting my tech stack and achievements, and my overall experience, sharing practical applications of my skills. I focused on communicating my work clearly and concisely, which I believe made a good impression.

Virtual Session:
Following the screening, I attended a one-hour virtual session hosted by Basil. This session was incredibly insightful, covering tips and tricks for interview preparation and strategies to approach technical problems efficiently. As a first-time interviewee, it significantly boosted my confidence.

Interview Process:
Unfortunately, my technical interview was postponed five times before it finally took place. When it did, the problem I was presented with was a variation of the 'Buy and Sell Stock' question, which was of medium difficulty. I took ample time to fully understand the question and explained my approach clearly, which the interviewer seemed to appreciate. However, due to time constraints and network issues, I struggled with implementing the solution and unfortunately lost track of time. Although I asked follow-up questions and clarified my doubts, I couldn't complete the problem effectively.

Outcome:
A few days later, I received a rejection email. While disappointing, I am still grateful for the opportunity. Being part of the Google interview process taught me invaluable lessons that I believe will greatly assist me in future endeavors.

Key Takeaways:

  • Time Management: I learned the importance of practicing solving problems within strict time limits to simulate real interview conditions.
  • Problem Understanding: It's crucial to stay calm to focus on understanding the problem thoroughly and articulating my approach clearly.
  • Adaptability: I need to learn to deal with unexpected challenges like technical issues or tight time constraints more effectively.
Although the outcome wasn't what I had hoped for, this experience provided me with a solid foundation for handling interviews, and I am optimistic about future opportunities.

Interview Questions (1)

Q1
Buy and Sell Stock (Variation)
Data Structures & AlgorithmsMedium

I was presented with a technical problem that was described as a variation of the classic 'Buy and Sell Stock' question. The specific variant wasn't detailed, but it required me to understand the problem fully and articulate my approach. I faced challenges with implementation due to time constraints and network issues.

Preparation Tips

I prepared by ensuring my resume and profile were polished and aligned with the role requirements. I also attended a one-hour virtual session hosted by Basil, which provided valuable tips and tricks for interview preparation and strategies for approaching technical problems. For future endeavors, I recognize the need to focus more on time management, thoroughly understanding problems, and adaptability to unexpected challenges.

Google | L4 | Interview Experience
google logo
Google
SDE II4.2 yearsOngoing
January 8, 202544 reads

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:

  1. InsertRange(int start, int end): This function takes two integer arguments, start and end, to create intervals where start is inclusive and end is exclusive.
  2. 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: 0 should return false, 2 should return true, 10 should return true.

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)

Q1
Evaluate Arithmetic Expression String
Data Structures & Algorithms

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: addition
  • mul: multiplication
  • pow: power
  • sub: subtraction
  • div: division
Q2
Interval Management System
Data Structures & Algorithms

Create two functions:

  1. InsertRange(int start, int end): This function takes two integer arguments, start and end. When called, it should create or merge intervals such that start is inclusive and end is exclusive.
  2. 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 return false
  • Query(2) should return true
  • Query(10) should return true
Google Phone screen | SWE3 | SWEIII | L4 | Bangalore
google logo
Google
SWE3Bangalore
December 22, 202441 reads

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)

Q1
Pi String Index Match
Data Structures & AlgorithmsMedium

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 = 456 and pi[454] = '4' pi[455] = '5' pi[456] = '6'.
  • String length can go up to 10^6.
Google L4 interview experience. Verdict: Reject.
google logo
Google
SDE IIRejected
December 17, 202447 reads

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)

Q1
Find Keys in BST within Range
Data Structures & AlgorithmsMedium

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.

Q2
Iterative Find Keys in BST within Range
Data Structures & AlgorithmsMedium

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.

Q3
Minimum Cost to Reach End by Jumping arr[arr[i]]
Data Structures & AlgorithmsMedium

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.

Q4
Minimum Strokes to Paint Fence
Data Structures & AlgorithmsHard

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.

Q5
Detect Timed Out RPCs in Log Stream
Data Structures & AlgorithmsHard

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.

Q6
Mahjong-like Tile Game: Find 4 Winning Hands
Data Structures & AlgorithmsHard

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).

Q7
Ad Server with Non-Consecutive Ad Serving
System DesignHard

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.

Q8
Ad Server with Cooldown Delay and Non-Consecutive Serving
System DesignHard

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.

Google SDE On campus
google logo
Google
SDE I
December 16, 202454 reads

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)

Q1
Conflict Resolution and Leadership Experience
Behavioral

was there a time when you were leading a project and had conflict of opinion with your teammate?

Q2
Path Existence in Graph with Single Corrupted Node
Data Structures & AlgorithmsMedium

A graph, source node, destination node, corrupted node will be given. Return whether you can reach the destination node from the source node.

Q3
Minimum Distances from Source Node
Data Structures & AlgorithmsMedium

Return array of minimum distances from the source node to all other nodes.

Q4
Path Existence with Virality-based Corrupted Nodes
Data Structures & AlgorithmsHard

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.

Q5
Path Existence with Multiple Virality-based Corrupted Nodes
Data Structures & AlgorithmsHard

There can be multiple corrupted nodes. Now return the same.

Q6
Paint Houses with Non-Adjacent Colors and Fixed Ends
Data Structures & AlgorithmsMedium

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.

Google | SWE(L3) | India | Dec 2024 [Reject]
google logo
Google
software engineerindiaRejected
December 5, 202448 reads

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)

Q1
Minimum Cost to Remove Terminal Nodes from Tree Root
Data Structures & Algorithms

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.

Q2
Player Ranking from Game Results
Data Structures & Algorithms

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.

Q3
Zero Array Transformation with Line Sweep and Binary Search
Data Structures & AlgorithmsMedium

This problem was based on the line sweep algorithm with a follow-up involving binary search. It was described as being similar to the LeetCode problem 'Zero Array Transformation I'.

Q4
Googliness / Behavioral Interview
Behavioral

This was a standard behavioral round designed to assess 'Googliness' and cultural fit.

Q5
Dice Game Wins for Player 1
Data Structures & Algorithms

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.

Google L4 interview expereince
google logo
Google
SDE IIHyderbadOffer
November 26, 202445 reads

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)

Q1
Router Broadcast & Shut Down
Data Structures & Algorithms

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.

Q2
Map IP Address to City Name
Data Structures & Algorithms

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.

Q3
Validate Organic Molecule Structure
Data Structures & Algorithms

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?

Q4
Largest Number from K Digits Subsequence
Data Structures & Algorithms

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

Q5
Generate Brute Force Password Attack List from Keylogger Data
Data Structures & Algorithms

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.

Google | Staff SDE | HYD | Rejected
google logo
Google
Staff SDEHYDRejected
November 22, 202430 reads

Summary

I was rejected for the Staff SDE role at Google, Hyderabad, primarily due to my performance in the second system design round.

Full Experience

I interviewed for a Staff SDE position at Google, Hyderabad. The process included two coding rounds and two system design rounds. My first coding round involved a problem about finding islands, and the second coding round focused on identifying common managers within an employee hierarchy. I then proceeded to two system design rounds. The first system design challenge was to design Google Photos. The final system design round tasked me with designing a real-time trend finder service using tweets, which unfortunately, I performed poorly in. This led to my rejection.

Interview Questions (4)

Q1
Find Island Surrounded by Water
Data Structures & Algorithms

Given a matrix, identify and find islands that are completely surrounded by water.

Q2
Find Common Manager in Employee Hierarchy
Data Structures & Algorithms

Given a list of employee objects, where each employee has an ID (int), name (str), and a list of reportees (List<EMPLOYEE>), and these employees belong to 4 different organizations. The task is to determine if two given employee IDs share a common manager somewhere in their reporting hierarchy.

Q3
Design Google Photos
System Design

Design the system architecture for Google Photos.

Q4
Design Real-time Trend Finder Service
System Design

Design a trend finder service capable of identifying trends using real-time tweets from X (formerly Twitter).

Google SWE | L4 | USA | Experience [Rejected]
google logo
Google
Software Engineer L4USARejected
November 6, 202457 reads

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: SH
This 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 / LH
This 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 / NH
This 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 / SH
A 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)

Q1
Trie Problem with Expansion
Data Structures & Algorithms

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.

Q2
OOP Design: Insert/Delete/Get Random & LRU Cache Mix
Data Structures & Algorithms

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.

Q3
Behavioral Interview
Behavioral

Standard behavioral questions covering past experiences, teamwork scenarios, and problem-solving approaches.

Q4
Complex Backtracking Problem
Data Structures & Algorithms

An additional coding round featured a backtracking problem with quite a few moving parts, suggesting a multi-faceted or intricate problem statement.

Google | Phone Screen | L4 | Reject
google logo
Google
Rejected
November 6, 202434 reads

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)

Q1
Design String Binary Tree Data Structure
Data Structures & Algorithms

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: Tree Example
So, here the complete string would be APPLEPIEBANANA

Question: Design a data structure that could represent the above tree.

Q2
Find Nth Character in String Binary Tree
Data Structures & Algorithms

Follow up: Find the Nth character in the string represented by the tree.

Google | Application Engineer Intern | Sept 2024 [Reject]
google logo
Google
Application Engineer InternRejected
October 18, 202443 reads

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)

Q1
Flatten N-ary Tree
Data Structures & Algorithms

I was asked to flatten an n-ary tree.

Q2
Preorder Traversal with Custom Tree Pointers
Data Structures & Algorithms

I was given a tree where nodes had pointers for parent, right sibling, and left child, and I needed to perform a preorder traversal.

Q3
Design an E-commerce Website
System Design

In the System Design round, I was tasked with designing an entire e-commerce website.

Google SWE 2025 NEW GRAD
google logo
Google
swe new gradOngoing
October 16, 2024121 reads

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)

Q1
Maximum Area in a Matrix of Coordinates
Data Structures & Algorithms

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.

Q2
Teammate Taking Credit
Behavioral

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?

Q3
Depth of Binary Tree
Data Structures & AlgorithmsEasy

Find the depth of a binary tree.

Q4
Integrating into a Difficult Team
Behavioral

How do I try to put myself or someone else into a team which is hard to get along with?

Q5
Handling Multiple Requests for Help
Behavioral

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.

Google India | SWE L3 | Interview Experience.
google logo
Google
SWE L3indiaOffer
October 15, 202446 reads

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)

Q1
Maximal Square with Additional Constraint
Data Structures & AlgorithmsMedium

The problem was similar to LeetCode's Maximal Square problem, but with an additional constraint. I started with a bruteforce approach and then optimized it using dynamic programming. I was also asked to identify and fix a bug in my code.

Q2
Longest Increasing Subsequence with Constraints
Data Structures & AlgorithmsMedium

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.

Q3
Mobile Lock Screen Pattern Count
Data Structures & AlgorithmsHard

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.

Q4
Farthest Distance in Graph (BFS/Dijkstra)
Data Structures & AlgorithmsHard

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.

Q5
Behavioral/Leadership Questions (Googlyness)
Behavioral

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.

Google L3 USA Onsite interview questions
google logo
Google
SDE IUSAOngoing
September 19, 202443 reads

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)

Q1
Manager Demands & Expectations
Behavioral

Tell me about a time when your manager set reasonable demands. Follow up asked for a situation with unreasonable demands.

Q2
Career Accomplishments
Behavioral

Tell me about one of the biggest accomplishments in your career so far.

Q3
Challenging Work Situation
Behavioral

Tell me about a time when you faced a challenging situation at work.

Q4
Managing Priorities
Behavioral

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.

Q5
Goal Setting & Achievement
Behavioral

Tell me about a time you set a goal for yourself and how you approached achieving it

Q6
Preferred Leadership Style
Behavioral

Describe one positive leadership/managerial style you liked from one of your previous managers and how did that affect your workstyle

Q7
Text Justification / Word Wrap
Data Structures & Algorithms

Given a sequence of words as a single string, place them into lines of specified width. Return the number of lines needed.

Q8
Apartment Assignment for Interns
Data Structures & Algorithms

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.

Q9
Largest Number from Subsequence of Digits
Data Structures & Algorithms

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.

Google Technical Interview
google logo
Google
Rejected
September 6, 202429 reads

Summary

I interviewed with Google for a technical role on September 2nd. The 45-minute session involved two challenging binary tree problems. Although I was not selected for the next rounds, the experience was a valuable learning opportunity that significantly boosted my confidence.

Full Experience

On September 2nd, I had the opportunity to interview with Google. The interview was a 45-minute one-on-one session, starting with introductions from both the interviewer and myself, which set a positive tone.

The technical part of the interview started with a problem involving binary trees. The first task was to design a tree where the parent node dictated the left and right child nodes' positioning based on specific conditions. I outlined the tree structure and then moved on to the next challenge: checking if a given number was present in the tree, assuming it was infinitely constructed.

While I knew the general approach for both problems, I missed a few critical points during the discussion. Despite this, the interviewer was supportive, and I took it as a valuable learning opportunity.

Unfortunately, I was not selected for the next rounds, but the experience taught me a lot in a short amount of time. It was incredible exposure to complex problem-solving in a high-stakes environment.

I am grateful to Google for this opportunity, as it significantly boosted my confidence and inspired me to keep improving. This experience has motivated me to work harder and prepare better for future challenges. Thank you, Google, for providing this platform, and I look forward to future opportunities to continue growing and learning.

Interview Questions (2)

Q1
Binary Tree Design with Conditional Child Positioning
Data Structures & Algorithms

Design a binary tree where the parent node dictates the left and right child nodes' positioning based on specific conditions. I was asked to outline the tree structure.

Q2
Search in Infinitely Constructed Binary Tree
Data Structures & Algorithms

Check if a given number is present in a binary tree, assuming the tree is infinitely constructed.

Google - L3(USA) Early career Interview questions
google logo
Google
SDE IusaOngoing
September 5, 202438 reads

Summary

I recently went through the L3 early career interview process at Google in the USA, which comprised a phone screen and a virtual onsite, covering coding, system design, and behavioral aspects.

Full Experience

Phone Screen

My phone screen consisted of one main coding problem with two follow-ups. The primary task was to remove duplicate elements from array A that were present in array B.

Virtual Onsite

G&L (Googliness & Leadership)

This round was entirely behavioral, focusing on my past experiences related to teamwork, leadership, and problem-solving within a team context. I shared stories about collaborating with diverse workstyles, going the extra mile to assist others, advocating for teammates, influencing colleagues positively, and managing increased responsibilities.

Technical 1

The first technical round had two problems. The initial one was a quick warm-up to count odd numbers in an array. The main challenge was to design a waitlist system for a restaurant, handling groups joining and leaving, and seating the first fitting group for a given table size.

Technical 2

In this technical round, I was presented with a problem about forming teams from a large group of people. Each team needed 5 specific roles, and people had preferences for these roles. The objective was to maximize the number of people assigned to their preferred roles.

Technical 3

The final technical round involved finding the shortest distance in a matrix. The matrix contained different elements: 'S' for start, 'F' for finish, '0' for passable cells, '1' for blockages. A unique aspect was that capital letters in cells acted as 'portals', allowing direct jumps to any other cell with the same letter. I also had a follow-up to return the actual path.

Interview Questions (10)

Q1
Remove Duplicates from Array A Present in Array B
Data Structures & AlgorithmsMedium

Given two arrays A and B, remove all elements from A that are also present in B. Elements in A can have duplicates. First, consider how to maintain the original order of elements from A in the result, and then how to return them in reverse order.

Q2
Dealing with Different Workstyles
Behavioral

Tell me about a time when you had to work with team members with different workstyles.

Q3
Going Above and Beyond
Behavioral

Tell me about a time when you went above and beyond to help someone.

Q4
Advocating for a Teammate
Behavioral

Tell me about a time when you advocated for a team mate to help them fit in at work.

Q5
Changing Colleague's Opinion
Behavioral

Tell me about a time changed a opinion of colleague from negative to positive.

Q6
Taking More Responsibilities
Behavioral

Tell me about a time you took more responsibilities how that impact on your assigned tasks.

Q7
Count Odd Numbers in Array
Data Structures & AlgorithmsEasy

Given an array, find the number of odd numbers present in it.

Q8
Design Restaurant Waitlist System
System DesignMedium

Design a waitlist system for restaurant management. Groups of people can join and leave the waitlist at any time. The restaurant should serve the first group that fits a given table size (table size passed as a parameter).

Q9
Team Formation with Role Preferences
Data Structures & AlgorithmsHard

Given a large group of people, form teams. Each team has 5 specific roles (A, B, C, D, E). Each person has a preference (not a strict requirement) for a role they want to perform. The goal is to form teams such that as many people as possible are assigned to their preferred roles.

Q10
Shortest Path in Matrix with Portals
Data Structures & AlgorithmsHard

Given a matrix where cells can have values [S, F, 0, 1, (any capital letter)]. 'S' is the start, 'F' is the finish, '0' means a passable cell, '1' means a blockage. If a cell contains a capital letter, you can directly teleport to any other cell containing the same capital letter. Find the shortest distance to go from 'S' to 'F', and also return the actual shortest path.

Google interview experience | L4 Software engineer | All rounds
google logo
Google
software engineer L42.8 yearsRejected
August 4, 202452 reads

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)

Q1
Vertical Line Dividing Rectangles into Equal Areas
Data Structures & Algorithms

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:

  1. Given rectangles can overlap with each other.
  2. The vertical line can pass through the rectangles.
It was an open-ended question where clarifications were expected by asking questions. I pictured out the question as shown below Image description

Q2
Find Good Arithmetic Subarrays
Data Structures & Algorithms

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.

Q3
Implement Job Scheduler with Blocking APIs
Data Structures & Algorithms

There is a class given which has below APIs available:

  1. countWords() (blocking in nature, doesn't imply job is done)
  2. isTaskCompeleted() (tells whether the job is actually completed).
A task is represented as the number of words in a given document. There are N machines present where the job can be scheduled (1 machine can handle 1 job at a time). Implement a method responsible for scheduling jobs on these machines. NOTES:
  • 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).
The interviewer asked follow-up questions to optimize the solution and tweaked the question slightly.

Q4
Design Music Playlist Shuffler with K-Play Constraint
Data Structures & Algorithms

Design a music playlist shuffler (music represented as an array of anything, e.g., integer, string).

  1. It should always return a random music.
  2. The returned music should not be returned again for the next K plays.
Randomness was expected similar to what rand() method provides in C++. I was also asked to write use cases for unit testing the same code.

Q5
Team Building and Management Scenarios
Behavioral

I was asked about my current role and some team-based questions:

  1. How would you build a team?
  2. 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?
  3. How would you resolve a conflict within a team?

Q6
Design Library to Evaluate Boolean Expression to TRUE
System Design

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.
The expectations were:
  1. 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?
  2. How the input should be?
  3. How the libarary will be invoked?
  4. Which data structures are going to be used & why (need to be cautious about the space & time complexity)?
  5. Can you write the associated Classes & APIs for the same (only declarations)?
  6. 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)
  7. 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.

Google Phone Screen | Jul 2024
google logo
Google
Ongoing
July 19, 202429 reads

Summary

I recently had a phone screen interview with Google in July 2024. The main focus was a challenging coding question that required grouping objects based on shared properties.

Full Experience

My Google phone screen in July 2024 involved a single technical question. The problem presented an array of objects, each with a unique ID and several properties (p1, p2, p3). The task was to group these objects such that any two objects sharing at least one common property would belong to the same group. I was given an example demonstrating the input and the expected output structure. I discussed my approach, which involved identifying connections between objects through their properties.

Interview Questions (1)

Q1
Group Objects by Common Properties
Data Structures & AlgorithmsMedium

Given an array of objects, group them into a single group if they have any property in common.

Object structure:
{ id, p1, p2, p3; }

p1, p2, p3 are properties and can be shared, while id will be unique for each object.

For Example:
Input :
E1 : id1, p1, p2, p3
E2 : id2, p1, p4, p5
E3 : id3, p6, p7, p8
E4 : id4, p9, p10, p5

Output :
{{id1, id2, id4}, {id3}}

Google L5 SWE - Offer
google logo
Google
Senior Software Engineerbangalore7.5 yearsOffer
July 11, 202455 reads

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)

Q1
Finding Complementary Numbers
Data Structures & AlgorithmsMedium

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.

Q2
Design a Role-Based Access Control (RBAC) System
System Design

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.

Google | L4
google logo
Google
SDE IIOffer
June 23, 202437 reads

Summary

I successfully navigated the Google L4 interview process, which included a screening round, four onsite technical rounds, and a Googleyness round, ultimately receiving an offer.

Full Experience

Background:

After receiving a referral from a friend, a Google recruiter contacted me within a week of my application around mid-March. I had a quick background check call that same week. Following that, I requested about a month for preparation due to commitments in my current organization, which the recruiter accommodated. I appeared for the screening round in the last week of April.

Screening Round:

I received a specific question during this round. My solution involved using a std::set in C++ to store unique floating-point values in a sorted manner. As values streamed in, I checked for valid triplets. If a triplet satisfied the condition |a-b|, |b-c|, |a-c| <= d, I removed those numbers from the set; otherwise, I inserted the current value. The interviewer seemed pleased, and the recruiter scheduled onsite rounds within two days. I requested 20 additional days for preparation, which was granted, scheduling the onsite interviews for mid-May.

Onsite Round #1:

This round involved a partitioning problem. I solved it using recursion with memoization, employing a 1D DP array where dp[i] represented the number of possible partitions starting from index i. My answer was dp[0]. The interviewer was satisfied with my approach and asked a follow-up question along similar lines, which I also answered.

Onsite Round #2:

I faced a question which I attempted to solve with a DP approach, consuming nearly all the available time. I suggested to the interviewer that a greedy solution might exist but admitted I couldn't formulate it precisely at that moment.

Onsite Round #3:

I was given a problem involving two arrays, A and B, of size n, representing signal strengths. The goal was to find the number of valid signals, where a signal is valid if it exists in both arrays within a distance <= D. I solved this using a sliding window of size 2D+1, storing frequencies of signal values from array B. As I iterated through A, I maintained the sliding window and updated frequencies, incrementing my answer when a matching signal was found. The interviewer was content with my solution.

Onsite Round #4:

Due to some confusion with the recruiter, I unexpectedly appeared for another technical onsite round instead of the planned Googleyness round. The recruiter later clarified this was not the original plan. The question was a variation of the Logger Rate Limiter problem. I also tackled a follow-up where I needed to print a message only if it appeared once within a window [t-10, t+10]. My solution involved a sorted map mapping time to messages, marking invalid entries with negative timestamps. The interviewer was very pleased.

I was already in the team matching phase before the Googleyness round and successfully matched with my second team preference.

Googleyness Round:

This was a friendly discussion where I was asked general questions about my experience at Microsoft, including how I handled ambiguities and resolved conflicts with my manager.

It took 10 days to prepare my packet and secure hiring committee approval.

Interview Questions (4)

Q1
Find Triplet in Stream with Threshold
Data Structures & Algorithms

I was given a problem where I needed to find and remove triplets (a,b,c) from a continuous stream of unique floating-point values. A triplet is considered valid if the absolute difference between any two elements is less than or equal to a given threshold d (i.e., |a-b| <= d, |b-c| <= d, |a-c| <= d). If a valid triplet is found, those numbers are removed from the set. Otherwise, the current floating-point number from the stream is added to the set.

Q2
Find Partitions
Data Structures & Algorithms

I was given a problem that involved finding partitions. The exact problem statement is available at the provided link.

Q3
Find Number of Valid Signals
Data Structures & Algorithms

Given two arrays A and B, each of size n, where A[i] and B[j] represent the strength of a signal received from two antennas placed at different locations. A signal is considered valid if it is present in both arrays A and B at a distance <= D. My task was to find the number of valid signals.

Example: A=[1,3,4,3,4,5,6], B=[4,1,8,7,6,3,2], D=2
Answer: The valid signals are A[0] (=B[1]), A[2] (=B[0]), A[6] (=B[4]), A[3] (=B[5]). Hence the answer is 4.

Q4
Logger Rate Limiter with Advanced Follow-up
Data Structures & Algorithms

I was asked to implement a Logger Rate Limiter, which prints a message only if it hasn't been printed in the last 10 seconds. As a follow-up, I needed to print a message only when it appears exactly once within a window [t-10, t+10].

Preparation Tips

I allocated approximately one month to prepare for the screening round and then an additional 20 days for the onsite interviews. My preparation focused on practicing LeetCode-style problems to strengthen my data structures and algorithms skills.

Google Challenger Question - Find the Optimum solution for Question and Volunteer scenario
google logo
Google
June 20, 202430 reads

Summary

I recently encountered a challenging Google problem that focused on efficiently assigning support questions to a team of volunteers based on their tag specializations.

Full Experience

During a technical challenge from Google, I was presented with an intriguing problem centered around resource allocation. The task was to create an optimal assignment strategy for support questions, each tagged with various topics, to a group of volunteers. Each volunteer had a specific set of tags they were proficient in. The core constraints were that a question could only be assigned to one volunteer, and a successful assignment required at least one matching tag between the question and the volunteer. This problem required careful consideration of matching algorithms and optimization to achieve the desired outcome.

Interview Questions (1)

Q1
Assign Support Questions to Volunteers
Data Structures & Algorithms

You run a support questions and answers website like StackOverflow. Recently, the amount of questions has grown dramatically. A group of engineers has volunteered to help but each volunteer has a prioritized list of tags they can support. Volunteers must be assigned questions with tags from their personal tags list.

JSON input:

{
  "questions": [
    {
      "id": "0",
      "title": "how do i install vs code",
      "tags": ["mac", "vs code"]
    },
    {
      "id": "1",
      "title": "my program is too slow please help",
      "tags": ["python", "ai"]
    },
    {
      "id": "2",
      "title": "why is the hitbox off by 2 pixels",
      "tags": ["c#", "game"]
    },
    {
      "id": "3",
      "title": "my dependency injection stack trace is strange",
      "tags": ["java", "oop"]
    },
    {
      "id": "4",
      "title": "socket.recv is freezing",
      "tags": ["python", "networking"]
    },
    {
      "id": "5",
      "title": "i have a memory leak",
      "tags": ["c++", "networking"]
    }
  ],
  "volunteers": [
    {
      "id": "sam5k",
      "tags": ["python", "networking"]
    },
    {
      "id": "djpat",
      "tags": ["ai"]
    },
    {
      "id": "jessg",
      "tags": ["java", "networking"]
    },
    {
      "id": "rayo",
      "tags": ["java", "networking"]
    }
  ]
}

Constraints:

  • Question can be assigned to at most one volunteer.
  • At least one tag must match between question and volunteer.

Expected Output:

Question ID: 1, Assigned To: djpat
Question ID: 3, Assigned To: jessg
Question ID: 4, Assigned To: sam5k
Question ID: 5, Assigned To: rayo
Google | Onsite | Word Break Problem
google logo
Google
May 21, 202429 reads

Summary

During my Google onsite interview, I was presented with the classic Word Break problem, which I successfully solved using dynamic programming.

Full Experience

My onsite interview experience at Google primarily revolved around a single coding challenge. I was given the Word Break problem and tasked with determining if a given string could be segmented into a space-separated sequence of words from a provided dictionary. I started by discussing my thought process, outlining a dynamic programming approach, and then proceeded to implement the solution while explaining the time and space complexities.

Interview Questions (1)

Q1
Word Break Problem
Data Structures & Algorithms

Word Break Problem

Problem Description:

Given a non-empty string s and a dictionary of words wordDict, determine if s can be segmented into a space-separated sequence of one or more dictionary words.

Input:

  • A string s (non-empty).
  • A list of words wordDict.

Output:

  • Return True if s can be segmented into a space-separated sequence of words from wordDict. Otherwise, return False.

Example:

  1. Input: s = "leetcode", wordDict = ["leet", "code"]
    • Output: True
    • Explanation: "leetcode" can be segmented into "leet code".
  2. Input: s = "applepenapple", wordDict = ["apple", "pen"]
    • Output: True
    • Explanation: "applepenapple" can be segmented into "apple pen apple".
  3. Input: s = "catsandog", wordDict = ["cats", "dog", "sand", "and", "cat"]
    • Output: False
Google | Onsite | Longest Increasing Subsequence
google logo
Google
May 21, 202444 reads

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)

Q1
Longest Increasing Subsequence (LIS)
Data Structures & AlgorithmsMedium

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].
Google | Onsite | Robot Room Cleaner
google logo
Google
May 21, 202444 reads

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)

Q1
Robot Room Cleaner
Data Structures & AlgorithmsHard

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:

  1. Clean the current cell.
  2. Move to the right.
  3. Clean the current cell.
  4. Turn right.
  5. Move to the down.
  6. Clean the current cell.
  7. Turn right.
  8. Move to the left.
  9. Clean the current cell.
  10. Turn right.
  11. Move to the up.
  12. The robot has now cleaned the entire room.
Google | Onsite | Longest Consecutive Sequence
google logo
Google
onsite
May 21, 202438 reads

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)

Q1
Longest Consecutive Sequence
Data Structures & AlgorithmsMedium

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

Google | L3 | Banglore | Apr 2024 [Reject]
google logo
Google
Software Engineer, L3Banglore2 yearsRejected
April 29, 202439 reads

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)

Q1
Internal Working of Hash-map
Other

Discussed the internal mechanisms and working principles of a hash-map data structure.

Q2
Modified Rate Limiting System Design
System DesignHard

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.

Q3
Sorting-Based Counting Problem with APIs
Data Structures & AlgorithmsMedium

Implement three APIs: insert, remove, and getMin. This was described as a medium-difficulty, sorting-based counting problem.

Q4
Approach to ML Project with No Hard Deadline
Behavioral

Discuss my strategy and approach for managing an ML-based project when there is no strict hard deadline.

Q5
Suggestions for Organizational Culture Changes
Behavioral

Provide insights and suggest possible changes or improvements to the current culture within my organization.

Q6
Situational Behavioral Questions
Behavioral

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.

Google Phone Screen | Software Engineer
google logo
Google
Software EngineerRejected
April 12, 202431 reads

Summary

I underwent a Google phone screen where the HR representative focused on my background, DSA familiarity, project experience, and career aspirations through a series of behavioral and screening questions. Despite my detailed responses, I received a rejection email on the same day as the interview.

Full Experience

During my recent Google phone screen interview for a Software Engineer role, the HR representative initiated the discussion by asking a series of questions to understand my background and abilities. I was asked about how I handle obstacles in my work, what a typical workday looks like for me, and my familiarity with various DSA topics. The conversation also delved into my strengths and challenges within DSA, asking me to rate my DSA proficiency and describe my tech stack. Further questions covered any project optimizations I've achieved, my motivation for seeking a new role, compensation expectations, and my notice period. Finally, I explained my methodology for conducting code reviews and how much time I typically spend coding each day. Despite my best efforts to provide thorough and thoughtful responses to all these questions, I regrettably received a rejection email on the same day as the interview.

Interview Questions (13)

Q1
Handling Task Challenges
Behavioral

How do you handle obstacles in your work?

Q2
Typical Workday
Behavioral

What does a typical workday look like for you?

Q3
DSA Topic Familiarity
Behavioral

Which DSA topics are you familiar with?

Q4
Strongest DSA Topics
Behavioral

Where do you excel in DSA?

Q5
Facing Difficulty in DSA
Behavioral

What types of questions do you find challenging?

Q6
DSA Proficiency Rating
Behavioral

How would you rate yourself out of 10 in DSA?

Q7
Describe Tech Stack
Behavioral

Can you describe your tech stack?

Q8
Project Optimizations
Behavioral

Share any optimizations you've achieved in your projects.

Q9
Motivation for Leaving
Behavioral

Why are you looking to leave your current company?

Q10
Compensation Details
Behavioral

What are your current and expected salary details?

Q11
Notice Period
Behavioral

How soon can you transition to a new role?

Q12
Code Review Methodology
Behavioral

Explain your methodology for conducting code reviews.

Q13
Daily Coding Time
Behavioral

How much time do you spend on coding each day?

Google | SDE - III (L4) | Rejected
google logo
Google
SDE - III (L4)3.5 yearsRejected
March 16, 202438 reads

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)

Q1
Queue Reconstruction by Height
Data Structures & AlgorithmsMedium

You are given an array of people, people[i] = [h_i, k_i] where h_i is the height of the i^th person and k_i is the number of people in front of the i^th person who have a height greater than or equal to h_i. Reconstruct the queue.

Q2
Longest Subarray with Sum Less Than or Equal to K
Data Structures & AlgorithmsMedium

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.

Q3
Logger Rate Limiter
Data Structures & AlgorithmsEasy

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!

Google | Online Assessment | Must Have Experience
google logo
Google
March 2, 202440 reads

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)

Q1
Maximum Subarray Sum
Data Structures & Algorithms

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.)
Google | SDE 2 (L3) | Interview Experience India
google logo
Google
SDE 2 (L3)India1 yearsOffer
February 25, 202452 reads

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)

Q1
Longest Consecutive Sequence (Variation)
Data Structures & AlgorithmsMedium

Given an unsorted array of integers nums, return the length of the longest consecutive elements sequence. The logic was somewhat similar to this example, but the question was a bit more complex.

Q2
Capacity To Ship Packages Within D Days (Painter's Partition Variation)
Data Structures & AlgorithmsMedium

A conveyor belt has packages that must be shipped from one port to another within D days. Given the weight of each package and D days, determine the minimum weight capacity of the ship. This was a variation of the painter's partition problem.

Q3
House Robber III (with Follow-ups)
Data Structures & AlgorithmsMedium

The professional robber has escaped to a new street, and you are given the root of a binary tree representing the houses. Each house has a certain amount of money. The concept was similar to robbing houses in a binary tree, with some follow-up questions.

Q4
Dungeon Game (Similar)
Data Structures & AlgorithmsHard

A knight is trying to rescue a princess in a dungeon. The dungeon is represented by a 2D grid, where each cell contains an integer representing health points. The goal is to find the minimum initial health the knight must have to rescue the princess. The problem asked was similar to this.

Q5
Partition Equal Subset Sum (Subset Operation)
Data Structures & AlgorithmsMedium

Given a non-empty array nums containing only positive integers, determine if the array can be partitioned into two subsets such that the sum of elements in both subsets is equal. The operation focused on a subset, with logic based on this problem.

Q6
Partition Array Into Two Arrays To Minimize Sum Difference (Subset-based)
Data Structures & AlgorithmsHard

Given an integer array nums of 2 * n integers, you need to partition nums into two arrays of length n such that the absolute difference between the sum of elements of these two arrays is minimized. This problem was again based on subsets.

Q7
Maximize Loss Interval
Data Structures & AlgorithmsMedium

I encountered this specific problem during my interview: Maximize loss interval. This problem was directly presented as discussed on LeetCode.

Q8
Maximum Employees To Be Invited To A Meeting (Similar Logic)
Data Structures & AlgorithmsHard

A company is holding a meeting and wants to invite as many employees as possible. Each employee has a preferred employee to meet. The underlying logic of the question asked was similar to this problem.

Q9
Count Of Smaller Numbers After Self (with Inverse Case)
Data Structures & AlgorithmsHard

Given an integer array nums, return an integer array counts where counts[i] is the number of elements to the right of nums[i] that are smaller than nums[i]. The question was similar to this, and I also had to solve for the case where I had the output and was asked to find the input.

Q10
Why Google and what motivates you?
Behavioral

Why Google and what motivates you for the Google?

Q11
Dealing with a difficult team member
Behavioral

Tell me about a time when you had to deal with a difficult team member. How did you handle the situation?

Q12
Project that didn't go as planned
Behavioral

Describe a project you worked on that didn't go as planned. What did you learn from the experience?

Q13
Prioritizing multiple tasks
Behavioral

Describe a time when you had to prioritize multiple tasks with conflicting deadlines. How did you manage your time?

Q14
Adapting to a new situation
Behavioral

Tell me about a time when you had to adapt to a new and unfamiliar situation. How did you approach it?

Q15
Challenging situation in a previous job
Behavioral

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.

Google L3 ROLE | Phone screening | Interview Experience
google logo
Google
SDE I
February 13, 202434 reads

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)

Q1
Message Spreading on Cartesian Plane
Data Structures & AlgorithmsMedium

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.

Google | Online Assessment | 2023
google logo
Google
Ongoing
September 30, 202335 reads

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)

Q1
Count Special Subsequences
Data Structures & AlgorithmsHard

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

Google Interview Tech+G&L Experience
google logo
Google
sweOngoing
September 29, 202330 reads

Summary

I had my first of two interview rounds with Google for a SWE role. This post details my experience from Round 1, which included a technical problem focused on minimum cost transactions from streamed inputs, alongside several behavioral (Googliness & Leadership) questions. I hope this helps others prepare.

Full Experience

I recently had my first of two interview rounds with Google for a SWE role. This initial round was split into a 45-minute technical section and a 15-minute Googliness & Leadership (G&L) discussion. For the technical part, I was given one question to solve within 45 minutes, which I'd classify as a medium to easy problem. My advice, based on this experience, is to always think calmly during the interview, allocate most of your time to discussing your approach, analyzing complexity, and exploring alternatives, aiming to complete the coding part within about 7 minutes. The G&L section consisted of several behavioral questions. I'm looking forward to sharing my second round experience soon!

Interview Questions (4)

Q1
Minimum Cost FizzBuzz Transactions
Data Structures & AlgorithmsMedium

Given a list of structs, where each struct has the following fields: type, name, quantity, and cost. The type can be either 'Fizz' or 'Buzz'. For 'Fizz', there is an integer cost, and for 'Buzz', the cost is always 0. A transaction always occurs from 'Fizz' to 'Buzz'. Your task is to print all transactions that can happen with the minimum cost.

Notes:
1. Transactions must be processed on a first-come, first-serve basis, assuming streamed inputs.
2. The output should be formatted as: "FizzBuzz! quantity From(name):To(name) cost", ensuring no duplicate transactions are printed.
3. There will be no negative cost values.

Example Input:

[
{
type : "Fizz",
name: "Alice",
quantity: 2,
cost: 10
},
{
type : "Fizz",
name: "Catherine",
quantity: 3,
cost: 5
},
{
type : "Buzz",
name: "Bob",
quantity: 7,
cost: 0
},
{
type : "Fizz",
name: "Alice",
quantity: 5,
cost: 8
}
]

Example Output:
FizzBuzz! 3 Catherine:Bob 15
FizzBuzz! 4 Alice:Bob 36

Explanation:
First transaction from Catherine to Bob! quantity -> 3, cost -> (3 x 5) = 15
Second transaction from Alice to Bob! quantity -> 2, cost -> (2 x 10) = 20
Third transaction from Alice to Bob! quantity -> 2, cost -> (2 x 8) = 16

Q2
Helping Someone Considerably
Behavioral

Tell me where you did something considerably out of hand to help someone.

Q3
Handling Failure
Behavioral

Tell me about a time when you failed, and how you handled it.

Q4
Leadership Activities in College
Behavioral

Are you involved in any kind of leadership activity in your college?

Preparation Tips

My preparation approach involved focusing on calm and strategic thinking during the interview. I prioritized spending the maximum amount of time discussing the problem's approach, analyzing its complexity, and considering alternative solutions. My goal was to complete the actual coding within about 7 minutes after a thorough discussion.

Google | SDE | US | July 2023
google logo
Google
SDE IusOffer
August 16, 202333 reads

Summary

I successfully navigated the Google SDE interview process in July 2023, ultimately receiving an offer despite an initial hiring freeze. The interviews included multiple challenging technical coding rounds, a behavioral discussion, and a Googlyness/puzzles round, where I demonstrated my problem-solving and communication skills.

Full Experience

In early July, my Google interview was scheduled while I was interning for Google US in a Site Reliability Role. The HR contacted me to set up an initial phone screen. The first question was an interval-based puzzle, somewhat similar to the interval list intersections problem on LeetCode. I managed to solve it, along with the follow-up questions.

However, things took an unexpected turn when Google announced a hiring freeze just as my technical interviews were about to begin. After a few weeks, I decided to reach out to HR. They were incredibly helpful and forwarded my resume to other teams. Receiving positive feedback from one of those teams was a significant morale boost.

Interview Rounds

  1. First Round - Technical Coding: I was presented with a challenge similar to the "My Calendar III" problem on LeetCode. It was labeled as "hard," and I initially found it tricky because the question had a twist, and I wasn't completely confident about Segment Trees. Despite the struggle, I managed to logically break down the problem and clearly explain my thought process to the interviewer. They seemed satisfied with my approach and asked me to implement it. Although my code had a few syntax errors, the underlying logic was sound. The interviewer overlooked the syntax issues and appreciated the optimal approach I presented, considering various scenarios. Unfortunately, we ran out of time to delve into complexities.
  2. Second Round - Technical Coding: This round gave me a tricky task: using four cards with numbers from 1 to 9, create an expression that evaluates to 24 using basic math operations and parentheses. This was quite a challenge, and I initially stumbled. My first solution wasn't up to par, and the interviewer questioned my data structure choices. After reflecting on my approach and discussing it with the interviewer, I improved my Depth-First Search (DFS) strategy, focusing on handling different cases and using a set to prevent duplicates. This time, my solution managed to pass the test cases, and the interviewer seemed satisfied. We even delved into discussing time complexities.
  3. Third Round - Behavioral: This round focused on discussing my past experiences and how I handle various situations. I shared insights about my family, work experience, skills, projects, open-source contributions, and achievements in hackathons. It was a more relaxed and positive conversation.
  4. Fourth Round - Technical Coding: By this point, I was quite drained. The question revolved around generating a sequence of digits that remains the same when rotated 180 degrees, essentially a number that looks the same upside down. The task was to find all such numbers of a specified length 'n'. While I initially struggled to come up with an iterative solution, I eventually managed to create a recursive solution that passed the test cases. We discussed time complexities and core concepts.
  5. Final Round - Googlyness and Logical Puzzles: This round was a mix of fun and challenging puzzles, and I managed to navigate through them fairly well.

After the rounds, I was asked to wait while the feedback was reviewed. After a brief period, I received the news that my feedback was strong and would proceed to the Hiring Committee. It took a bit of time to get the final response due to some team members being on leave, but in the end, I was thrilled to learn that I had succeeded and received an offer.

Interview Questions (2)

Q1
24 Game
Data Structures & AlgorithmsHard

Given four cards, each bearing a number from 1 to 9, the task is to determine if it's possible to create an arithmetic expression using all four cards and any of the four basic operations (+, -, *, /) along with parentheses, such that the expression evaluates to exactly 24. Each number must be used exactly once.

Q2
Strobogrammatic Number II
Data Structures & AlgorithmsMedium

A strobogrammatic number is a number that looks the same when rotated 180 degrees. The valid digits for such numbers are '0', '1', '6', '8', '9' (where '6' becomes '9' and '9' becomes '6' upon rotation, and '0', '1', '8' remain themselves). The problem requires generating all possible strobogrammatic numbers of a given length 'n'.

Preparation Tips

If I were to offer advice, I'd suggest focusing heavily on Graphs and tackling difficult Dynamic Programming (DP) questions. It's perfectly okay to get stuck during a problem; just make sure to ask relevant follow-up questions to clarify and guide your approach.

Google || SDE - 1 || Interview
google logo
Google
SDE 1Ongoing
July 15, 202336 reads

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)

Q1
Reverse Integer
Data Structures & AlgorithmsEasy

Given a 32-bit signed integer, reverse digits of an integer. Assume we are dealing with an environment which could only store integers within the 32-bit signed integer range: [-231, 231 - 1]. For the purpose of this problem, assume that your function returns 0 when the reversed integer overflows.

Q2
Next Permutation
Data Structures & AlgorithmsMedium

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.

Google First Round: Format a list of strings into a table
google logo
Google
Ongoing
November 23, 202236 reads

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)

Q1
Format List of Strings into Table
Data Structures & AlgorithmsMedium

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

Google | SWE Intern (Winter)| India | Sep 2022 | Rejected
google logo
Google
swe internbangalore/hyderabadRejected
September 10, 202240 reads

Summary

I interviewed for a Software Engineer Intern position at Google in September 2022. Despite performing well in the first technical round, I struggled significantly with a hard dynamic programming problem in the second, ultimately leading to a rejection.

Full Experience

I had my interview for a SWE Intern position for Winter 2023 at Google, located in Bangalore/Hyderabad, during September 2-4, 2022. I went through two 45-minute technical interviews, both strictly focused on problem-solving with Data Structures and Algorithms.

Technical Interview 1:
This round was considered a MEDIUM level problem. After a warmup question about checking if a target x exists in a series of intervals, the main question was a follow-up. I was given a stream of queries (q), each with a target x, and my task was to return a boolean array indicating if each x exists in one or more given intervals. The interviewer clarified that the intervals were non-overlapping, sorted, and non-negative. The required time complexity was O(log N) and space O(1). We also discussed how to handle overlapping intervals as a final follow-up. The feedback from this round was positive; I successfully explained brute-force, a better approach, and the optimal binary search solution that was expected. The interviewer suggested I practice coding in a time-bounded environment for faster execution. He was quite chill, helpful, offered hints, and prioritized problem-solving approaches over perfect code.

Technical Interview 2:
This interview was a HARD level problem. I was presented with two lists of integers, A and B, representing daily profits for working at CityA and CityB, respectively. As a salesman, I needed to switch between these cities, with travel days (T) yielding zero profit. My goal was to output a schedule (like 'ATBB') that maximized total profit. Key clarifications from the interviewer included: arrays A and B would always have equal length, each index represented a day, travel days resulted in zero profit, I could work in a city for multiple days, but traveling was mandatory (I couldn't work solely in one city), and there would be no zero values in the profit arrays. After considerable effort, I realized it was a recursion-based problem, and the interviewer asked for a memoized dynamic programming solution. Despite my experience with DP problems, this specific type was unfamiliar, and I was stuck. I needed significant hints and, in the final minutes, could only produce a few lines of awfully broken code. The feedback for this round was to focus on solving hard-tagged dynamic programming problems from LeetCode. This interviewer was quite unhelpful, remaining silent while I struggled, and even had difficulty explaining the approach himself in the final moments. I couldn't fully grasp his explanation. While I know I need to improve, I strongly felt that with a little more guidance, I could have solved it. This experience taught me not to assume interviewers will always be helpful and to prepare in a way that minimizes the need for assistance. It was a tough day, but these things happen.

I am requesting the brilliant coders and problem solvers present in the LeetCode community to provide meaningful approaches and/or solutions to the problems I stated. It will be very helpful to me and others. A humble request for Java/Python solutions, as I really struggle with C++ codes. Thanks in advance! Happy LeetCoding!

Interview Questions (2)

Q1
Search Target in Stream of Non-Overlapping Sorted Intervals
Data Structures & AlgorithmsMedium

You are given a series of intervals in the form of a list of lists (e.g., [[1-3],[4-7],[9-21]]). Instead of a single target x, you will be given a stream of queries (q), where each query will have a target x. Return a boolean array (e.g., {True,False,True,...]) for given queries, True if they exist in one or more intervals, and False, if they do not exist in any of the given interval.

Testcase:
Input:
[[1-3],[4-7],[9-21]], queries = [4,6,8,10,15]

Output: [True,True,False,True,True]

Explanation -
Every query except 8, exists in the given intervals.

Clarifications from interviewer:
1. Intervals are non overlapping.
2. They are sorted.
3. You can assume there will be no negative intervals.

Required Time Complexity: O(log N)
Required Space Complexity: O(1)

Final follow up: What if the intervals were overlapping?

Q2
Maximize Salesman Profit with City Switches and Travel Days
Data Structures & AlgorithmsHard

Given two lists of integers, A and B, list A represents the daily profit of working at CityA and list B represents the daily profit of working at CityB. You are a salesman and you have to switch between CityA and CityB due to various client requirements. When you switch from CityA to CityB, you have to travel. The day you travel (T), cannot be considered as a working day, and hence your net profit on travel days are 0. Your task is to output a schedule which includes working as well as travelling such that your profit is maximized.

Example Testcase:
Input:
A[] = [23,4,5,2], B[] = [20,1,10,100]

Output:
"ATBB"

Explanation -
An optimal schedule will be-
Day 1 : Work at CityA -> profit is 23
Day 2 : Travel -> profit is 0
Day 3: Work at CityB -> profit is 10
Day 4: Work at CityB -> profit is 100

Clarifications from interviewer:
1. The length of array A and array B will always be equal. Each index of array A/B is treated as day(i), and the value at day(i) is your profit for that day (if you worked). If you travelled at day(i), profit for that day won't be added to your net profit.
2. You can work in a city for more than 1 day. But, travelling is mandatory. You cannot work in only city A or city B.
3. There will be no dreaded zeroes in any of the array values.

Required Time Complexity: O(N)
Required Space Complexity: O(N)

Preparation Tips

Based on the feedback from my interviews, I recognize the need to practice coding in a time-bounded environment for faster execution. For the second interview's challenge, I was specifically advised to tackle hard-tagged dynamic programming problems from LeetCode. A key takeaway for me is also to never assume interviewers will be explicitly helpful; therefore, preparing in a self-sufficient manner is crucial.

Google Onsite Round L4 Experience | India
google logo
Google
software engineer l4india2 yearsOffer
September 7, 202235 reads

Summary

I successfully received an L4 Software Engineer offer from Google India after a series of interview rounds, including a phone screen, three technical onsites, and a behavioral round.

Full Experience

It was great to finally receive an offer from Google! This community has been incredibly helpful, so I wanted to share my experience. My journey started with a phone screen back in January 2022. After that, I had a gap and then went through my onsite rounds in July and August.

Phone Screen: I don't remember the exact problem, but it was similar to finding if all airports are connected by paths and adding minimum paths if not. I initially used connected components, and for a follow-up about adding airports and paths, I used Prim's algorithm with a dummy node. I received feedback that my solution was optimal but missed one edge case (which I corrected during the call) and could have used better data structures. I was asked to re-interview in a few months, skipping the phone screen.

Onsite Round 1: This round focused on finding the Kth largest element in an infinite stream. For a constant K, I used a min-heap. The follow-up involved a variable K, for which I proposed a binary search on prefix sums followed by a segment tree approach. The interviewer seemed satisfied.

Onsite Round 2: I was asked to find the sum of all subarrays that are arithmetic progressions. My initial solution was O(N) time and O(N) space, which I then optimized to O(1) space after being prompted. The interviewer was satisfied with the optimality. Feedback suggested my solution was optimal, with minor callouts about communication and average problem-solving speed.

Onsite Round 3: This question involved finding the shortest path in an n*m grid with 0s (free) and 1s (obstacles), starting from the top-left to the bottom-right, allowing 8-directional movement and removing at most K obstacles. I used BFS + DP. The follow-up introduced removing obstacles in '+' or 'X' forms with associated costs, which I handled with BFS + DP with slight tweaks in transitions.

Onsite Round 4: This was a behavioral round where I discussed my experience and leadership qualities.

After all rounds, the recruiter confirmed good feedback, but getting a Headcount slot was challenging, so I was placed in a wait queue. Eventually, I received the offer!

Interview Questions (7)

Q1
Connect All Airports with Minimum Paths
Data Structures & AlgorithmsMedium

Given a set of airports and existing paths between them, determine if all airports are reachable from each other. If not, find the minimum number of additional paths needed to connect all airports such that they become fully connected. A follow-up involved handling the dynamic addition of airports and paths.

Q2
Kth Largest Element in Infinite Stream (K Constant)
Data Structures & AlgorithmsMedium

Design a data structure or algorithm to efficiently find the Kth largest element from an infinite stream of integers, where K is a constant value.

Q3
Kth Largest Element in Infinite Stream (K Variable)
Data Structures & AlgorithmsHard

Extend the previous problem: design a data structure or algorithm to efficiently find the Kth largest element from an infinite stream of integers, where K is now a variable that can change with each new integer arriving in the stream.

Q4
Sum of All Arithmetic Subarrays
Data Structures & AlgorithmsHard

Given an integer array, find the sum of all subarrays that are arithmetic progressions. An arithmetic progression is a sequence of numbers such that the difference between consecutive terms is constant.

Example:
Input: [7, 4, 5, 6, 5]
Output: 86

Explanation:
Arithmetic subarrays are:
[7], [4], [5], [6], [5]
[4, 5], [5, 6], [6, 5]
[4, 5, 6]
Sum of all is 86

Q5
Shortest Path in Grid with K Obstacle Removals
Data Structures & AlgorithmsHard

Given an n*m grid where each cell is either 0 (free path) or 1 (obstacle). Starting from the top-left cell, find the shortest path to the bottom-right cell. You can move in any of 8 directions (horizontally, vertically, or diagonally). You are allowed to remove at most K obstacles along your path.

Q6
Shortest Path in Grid with Patterned Obstacle Removals
Data Structures & AlgorithmsHard

Extend the previous problem: You can now remove obstacles in specific patterns ('+' form or 'X' form), with an associated cost for each removal. Find the shortest path from top-left to bottom-right.

Q7
Behavioral and Leadership Questions
Behavioral

This round focused on standard behavioral questions, probing into my past experiences and evaluating my leadership qualities.

Preparation Tips

I had a background in competitive programming from college and solved around 140 LeetCode questions: 90 Medium, 40 Hard, and the rest Easy. I continued practicing between my phone screen and onsite rounds.

Google | 9 months Experience | Software Engineer
google logo
Google
software engineer0.75 yearsRejected
July 17, 202230 reads

Summary

I interviewed for a Software Engineer position at Google, undergoing multiple coding rounds and a behavioral assessment. Despite performing well enough to receive 'Leaning hire' ratings in my technical rounds, I was ultimately rejected. Although offered reconsideration, I withdrew from the process after accepting an offer from another company.

Full Experience

Background

I graduated in 2021 and had 9 months of experience when a Google recruiter reached out to me in April 2022. Interestingly, I received this call on the same day I got a rejection email from another company. The recruiter gave me 3-4 weeks to prepare for the onsite rounds, which were scheduled for May 2022. All my interviewers were from Google's Zurich office in Switzerland, and sometimes I struggled to understand their questions due to their accent. However, it was a good experience because I could ask questions until I fully understood. The Google recruiter was incredibly helpful, discussing strategies with me and offering advice on coding practices and what to focus on during the interview.

First Onsite Round

I felt a lot of pressure during this round, which unfortunately prevented me from thinking optimally, and I ended up writing a lengthy, less efficient code. The optimal solution only occurred to me after the interview had concluded. The result for this round was 'Leaning hire'. After this round, I felt underprepared for Google and stopped preparing for a while.

Second Onsite Round (one week later)

This round also resulted in a 'Leaning hire'.

Third Onsite Round (two days later)

This round too resulted in a 'Leaning hire'.

Fourth Onsite Round (one week later)

This was a 'Googlyness' round, focusing on behavioral aspects.

Final Result

Ultimately, I received a rejection. However, the recruiter offered to schedule two more coding rounds for reconsideration. By then, I had already joined another firm, so I was unable to proceed with the additional rounds.

Overall, giving a Google interview was a unique experience, and I hope to clear it successfully next time.

Interview Questions (7)

Q1
Max Length Straight Line in 2D Array
Data Structures & Algorithms

Given a 2D array consisting of 0s and 1s, count the maximum length of a straight line formed by contiguous 1s. The line can be oriented diagonally, anti-diagonally, horizontally, or vertically.

Q2
Count Paths in 2D Array (Bottom-Left to Bottom-Right)
Data Structures & Algorithms

Given a 2D array, count the number of possible paths from the bottom-left corner to the bottom-right corner. Movement is allowed horizontally, diagonally, or anti-diagonally.

Q3
Count Paths with Obstacles in 2D Array
Data Structures & Algorithms

This is a follow-up to the previous question. Given a 2D array and a list of 'bad indices' (i,j) which should not be present in any path, find the total number of paths from the bottom-left corner to the bottom-right corner, allowing horizontal, diagonal, or anti-diagonal movement, while avoiding all 'bad indices'.

Q4
Count Pairs with Absolute Difference Equal to Index Difference
Data Structures & Algorithms

Given an array a of n elements, find the total count of pairs of indices (i, j) such that |a[i] - a[j]| = i - j.

Q5
Count Pairs with Absolute Differences Equal
Data Structures & Algorithms

This is a follow-up to the previous question. Given an array a of n elements, find the total count of pairs of indices (i, j) such that |a[i] - a[j]| = |i - j|.

Q6
Divide Two Integers without Division Operator
Data Structures & Algorithms

Implement integer division without using multiplication, division, or modulo operators.

Q7
Googlyness Round
Behavioral

This behavioral round assesses alignment with Google's culture and values, focusing on aspects like teamwork, leadership, problem-solving approach, and how one embodies 'Googly' principles.

Preparation Tips

Points to Remember for Preparing Coding Rounds:

  • I focused my preparation heavily on Data Structures and Algorithms.
  • I tried to solve problems as independently as possible.
  • I proactively considered optimizing my solutions.
  • Before coding, I thought about tradeoffs and overlapping replacements in algorithms.
  • It's crucial to be vocal and verbalize your thought process; never be silent.
  • I made sure to proactively think of a variety of test cases, rather than waiting for the interviewer to prompt me.
  • I kept a tab on my coding speed, considering the 45-minute slot for each round.

Before the Google Interview, some points I learned to keep in mind:

  • Always ensure you understand the question properly, without any lingering doubts.
  • If I had doubts, I made sure to ask for clarification.
  • Interviewers also check if you can identify missing parameters in a question; sometimes they intentionally omit details, expecting you to ask for them.
  • It's acceptable to ask for hints if you get stuck.
  • Never forget base cases (I made this mistake in one round).
  • Always dry run your code first before telling the interviewer you're done.
  • Always use an optimized data structure.
  • Have a clear understanding of which data structure is appropriate for the problem.
  • Discuss time and space complexity with your interviewer before writing any code.
  • Write production-level code, organizing it into short modules.
  • Aim for bug-free code.
Google | Onsite | Longest Chain Words
google logo
Google
Onsite
July 8, 202238 reads

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)

Q1
Longest Word Chain with Single-Letter Suffix Difference
Data Structures & AlgorithmsHard

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})

Google L4 Offer | Bangalore | June 2022 | Accepted
google logo
Google
SDE IIbangalore3 yearsOffer
July 7, 202236 reads

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)

Q1
Activity Selection Problem
Data Structures & AlgorithmsMedium

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.

Google | L4 | Phone Screen | June 2022
google logo
Google
SDE IIOngoing
July 7, 202239 reads

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)

Q1
Longest String Chain with Single Character Start
Data Structures & Algorithms

Given a list of words, find the longest possible word chain where each word is formed by adding exactly one character to the previous word. The chain must start with a single-character string (e.g., 'a' -> 'ab' -> 'abc'). This is a variation of the classic Longest String Chain problem.

Google | Onsite | Router Broadcast & Shut Down
google logo
Google
July 3, 202242 reads

Summary

I encountered a challenging problem during my Google onsite interview that involved simulating a message broadcast and router shutdown scenario within a wireless network.

Full Experience

During my Google onsite interview, I was presented with an interesting problem related to network simulation. The interviewer asked me to define a 'Broadcast & Shut Down' message, where a router, upon receiving it, broadcasts the message to all other routers within its wireless range before shutting down and becoming inactive. I needed to determine if a message from Router A could reach Router B given a list of router locations and a wireless range. This problem required me to design a function, provide test cases, and analyze its time and space complexity.

Interview Questions (1)

Q1
Router Broadcast & Shut Down
Data Structures & AlgorithmsHard

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), tell me whether a message from Router A can reach Router B. 1. Write a method / function with appropriate input and output arguments. 2. Write test case's. Also, mention the Time and Space complexity for the same.

Google | Interview Experience | SE - Full Stack | Virtual Interview
google logo
Google
SE - Full Stack DeveloperIndia
June 3, 202236 reads

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)

Q1
Robot Path in Grid with One Wall Break
Data Structures & AlgorithmsMedium

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.

Q2
FCFS Job Scheduling
OtherMedium

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.

Q3
N-ary Tree Disconnected Components After Edge Removal
Data Structures & AlgorithmsHard

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.

Google | L4 | Banaglore [Accepted]
google logo
Google
SDE IIbangalore4 yearsOffer
April 22, 202231 reads

Summary

I successfully navigated multiple coding and behavioral rounds for an L4 Backend/FullStack role at Google in Bangalore, ultimately receiving an offer. My journey involved overcoming an initial setback from a previous Google interview and rigorous preparation in Data Structures and Algorithms.

Full Experience

I was approached by a Google recruiter through LinkedIn in late December for a Backend or FullStack L4 role. After an initial conversation, my screening round was scheduled for late January. During the screening, I tackled a problem that was a variation of Merge K Sorted Lists, focusing on merging n arrays efficiently. I successfully came up with an approach, implemented it, and discussed its complexity, leading to a 'Hire/Strong Hire' verdict.

The recruiter's positive feedback gave me two months to prepare for the onsite interviews, which I scheduled for March 2022.

My onsite rounds were structured as follows:

  • Round 1 (Googleyness): This was a behavioral round where I answered questions about my past experiences and hypothetical situations. I received a 'Hire/Strong Hire'.
  • Round 2 (Coding): I solved a tree-based problem involving in-order traversal, initially using extra space, and then optimized it for constant space. I completed this quickly, and the interviewer seemed happy with my solution.
  • Round 3 (Coding): This round involved a Tree + DP problem. I started with a brute-force approach and implemented it, but I struggled with the follow-up question and needed a hint. Although I solved the follow-up, I couldn't fully implement it. This resulted in a 'Lean/No Hire'.
  • Round 4 (Coding): This wasn't a typical coding problem but a real-life scenario that boiled down to a matrix problem. I thought I solved it efficiently, but there was a better constant-time approach I missed. This also led to a 'Lean/No Hire'.

After these rounds, the recruiter informed me that two of my feedbacks were mediocre, and my packet would be considered for an L3 role instead of L4. I was offered two additional rounds to compensate, which I accepted, scheduling them a week later.

The additional rounds were:
  • Round 5 (Coding): This was another real-life challenge that eventually turned into a graph-based problem. I used BFS to solve and implement it, and also tackled a follow-up. We discussed time/space complexity, test cases, and corner cases. When asked about reducing space complexity, I proposed a Union-Find based approach, which the interviewer appreciated. I received a 'Hire/Strong Hire'.
  • Round 6 (Coding): This round involved an array problem stemming from a real-life challenge. I first implemented a brute-force solution, discussed its complexity, and then optimized it for better time complexity using Binary Search. The interviewer was satisfied with my approach and the implementation, giving me another 'Hire/Strong Hire'.

Three days later, the recruiter confirmed positive feedback and scheduled a Team Match call. I discussed the product and role with the Hiring Manager, and everything went smoothly. I am currently awaiting HC clearance for my L4 packet.

Interview Questions (1)

Q1
Merge K Sorted Lists Variation
Data Structures & AlgorithmsHard

The problem's core was to merge n arrays into a single sorted array. The primary challenge was efficiently merging two arrays, then extending that logic to merge multiple arrays. I was asked to implement the solution and discuss its time and space complexity. This was a variation of the LeetCode problem 'Merge K Sorted Lists'.

Preparation Tips

My preparation strategy is detailed in a separate post. I focused heavily on Data Structures and Algorithms after failing a previous Google screening round in 2019. This dedication eventually paid off. My key takeaways included understanding problems thoroughly, starting with brute force before optimizing, brainstorming ideas, and writing clean, production-ready code. Preparation Strategy Link

Google onsite
google logo
Google
Offer
March 18, 202235 reads

Summary

I had an onsite interview at Google where I tackled several algorithm problems similar to those on LeetCode. Despite the problems not being exact matches, the links I provided convey the type of challenges I faced. I was successful in my interview and received an offer.

Full Experience

My onsite interview experience at Google involved several coding rounds. While the problems I was given weren't identical to specific LeetCode questions, I've shared links to similar problems that represent the core concepts and difficulty level I encountered. It was a challenging yet rewarding process. I'm happy to share that I successfully cleared the interviews and received an offer to join Google, where I've been working for some time now. To everyone currently preparing for interviews, keep pushing forward; your hard work will pay off!

Interview Questions (3)

Q1
Race Car
Data Structures & AlgorithmsHard

Your car starts at position 0 and speed +1 on an infinite number line. Your car can go into two actions: 'A' (Accelerate) and 'R' (Reverse). 'A': position += speed, speed *= 2. 'R': if speed is positive then speed = -1 else speed = 1, position remains the same. Find the minimum number of instructions to get to a target position.

Q2
Shortest Path in a Grid with Obstacles Elimination
Data Structures & AlgorithmsHard

You are given an m x n integer matrix grid where each cell is either 0 (empty) or 1 (obstacle). You can move up, down, left, or right. If you want to move from a cell (x, y) to (x+1, y), and grid[x+1][y] is 1, you can eliminate this obstacle. You are also given an integer k, which is the maximum number of obstacles you can eliminate. Return the minimum number of steps to walk from (0, 0) to (m-1, n-1) or -1 if it is not possible.

Q3
Maximum Number of Visible Points
Data Structures & AlgorithmsMedium

You are given an array points, an integer angle, and a location array [pos_x, pos_y] where points[i] = [x_i, y_i] denotes the position of point i on a 2D plane. You are standing at location and can see all the points in a circular sector. The sector's angle is angle degrees, and its origin is your location. You can rotate this sector counter-clockwise around your location. Return the maximum number of points you can see. Note that points that are exactly at your location should always be counted.

Google | Data Scientist | Zurich | Aug 2021 [Reject]
google logo
Google
Data ScientistZurichRejected
March 12, 202240 reads

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)

Q1
Describe Previous Projects
Behavioral

Describe your previous projects and experiences relevant to the Data Scientist role.

Q2
Why Google?
Behavioral

Explain your reasons for applying to Google and this specific Data Scientist role.

Q3
Design a Survey
Other

How would you design a survey, considering statistical principles and potential biases? This question was mostly statistics-based.

Q4
Sample from a Normal Distribution
Data Structures & Algorithms

Implement a function or code snippet to sample from a normal distribution. I was allowed to use a Python library for this task.

Google | L3 | On-site | Bangalore | Offer
google logo
Google
SDE Ibangalore1.5 yearsOffer
March 7, 202235 reads

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)

Q1
Room Assignment with Smallest ID
Data Structures & AlgorithmsMedium

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.

Q2
Frog Crossing Highway with Cars
Data Structures & AlgorithmsHard

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.

Q3
First Bad Commit
Data Structures & AlgorithmsEasy

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.

Q4
Word Break II (Similar)
Data Structures & AlgorithmsHard

A question very similar to Word Break II.

Q5
Count Computers on a Network
OtherHard

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() and receive() 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.

Google | L3 New Grad | Hyderabad, Bangalore | Feb 2022
google logo
Google
Software EngineerHyderabad, BangaloreNo Offer
February 25, 202237 reads

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.

  1. 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.
  2. 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.
  3. 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.

  1. 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.
  2. 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.

  1. 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.
  2. 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)

Q1
Find and Replace in String
Data Structures & AlgorithmsMedium

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.

Q2
Valid Set of Cards
Data Structures & Algorithms

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.

Q3
Find Valid Card Sets (N Cards)
Data Structures & Algorithms

Given n number of cards, return 3 valid cards set if they exist. (Validity rules explained above for 'Valid Set of Cards')

Q4
Longest Arithmetic Sequence in Binary Tree (Lower Level Constraint)
Data Structures & Algorithms

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.

Q5
Longest Arithmetic Sequence in Binary Tree (No Constraint)
Data Structures & Algorithms

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.

Q6
Find Unpainted Segments and Paint Range
Data Structures & Algorithms

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.

Q7
Behavioral: Above and Beyond
Behavioral

Tell me about a situation when you went above and beyond what was expected of you?

Q8
Behavioral: Critical Feature Bug
Behavioral

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.

Google | L4/ L3 | Bangalore | Nov-Dec 2021 (7 technical rounds)| [Rejected]
google logo
Google
Software Engineer (L3/L4)Bangalore3.5 yearsRejected
February 5, 202233 reads

Summary

I interviewed for a Software Engineer L3/L4 role at Google Bangalore in late 2021, undergoing seven challenging technical and behavioral rounds over two months. Despite receiving positive feedback in some rounds and making it through additional committee-requested interviews, I was ultimately rejected for both L3 and L4.

Full Experience

I was employed with 3.5 years of experience at a product-based company and held a B.Tech CSE degree when I began the interview process with Google. The entire process for the Software Engineer L3/L4 role in Bangalore ran for two months, from November to December 2021. I found Google recruiters to be very supportive, providing ample time and resources for preparation.

The first round was a Technical Screening (45 mins). I was asked a problem about finding the maximum sum possible by removing k elements from either end of an array, along with a follow-up involving a cost factor. The expectation was to walk through my thought process and present working code.

The second round was an Onsite Technical (45 mins) where I had to create a complete Binary Search Tree (BST) from a singly sorted linked list. This was an open-ended problem, requiring me to ask clarifying questions and then implement the solution.

Round 3 (Onsite Technical, 45 mins) started with a warm-up on fitting text into a fixed-width page to minimize lines. The main problem was designing a two-column table on a fixed-width page to minimize overall height by finding the optimal column partitioning.

For Round 4 (Onsite Technical, 45 mins), I tackled a System Design question: design a scheduler supporting acceptTask, removeTask, and getNextScheduledTask, with tasks having an associated dueTime. This round was ambiguous and required significant clarification.

Round 5 (Onsite Googlyness, 45 mins) was behavioral. After a brief introduction, I discussed my favorite problem, how I collaborated with different teams, handled lack of help, managed peers feeling left out, dealt with workload and stress, and situations where I pushed back on my manager.

After these five rounds, the recruiter informed me I had three positive feedbacks (two for L3, one for L4) and one negative. My application was sent to GHC for review, and I was asked to fill out a form with my qualifications. A week later, I was told the committee wanted two more technical rounds, with the potential offer being for L3 only.

Round 6 (Technical, 45 mins) was a graph problem, related to a hierarchical category structure. Part 1 involved finding all transitive parents of an input category. Part 2 was a design subproblem: modeling and converting a filter class for conditions like 'telephones that are not wireless devices'.

The final Round 7 (Technical, 45 mins) also involved a graph. Part 1 asked for the minimum time to reach a treasure from a source in a graph with locked nodes, where movement through locked nodes is forbidden. Part 2 was a follow-up: if the treasure is unreachable, find the minimum number of locked nodes to unlock to create a path, with cost being the number of unlocked rooms. I implemented workable code for both parts.

The final verdict came almost two weeks after these additional rounds: I received one strong hire for L3 and one partial/neutral hire, but the committee decided not to proceed with my candidature.

Overall, the interviewers were experienced, and the sessions were good problem-solving experiences. The recruiter provided timely updates and detailed feedback. The downside was being downleveled and ultimately rejected for L3 after seven rounds. I hope my experience helps other candidates prepare.

Interview Questions (15)

Q1
Max Sum by Removing K Elements from Ends
Data Structures & AlgorithmsMedium

Given an array, find the maximum sum possible by removing exactly k elements from either end of the array. For example, if the array is (3, 100, 1, 1) and k = 2, the output is 103 (by removing the 3rd and 4th elements, leaving 3, 100).

Q2
Max Sum with Cost Factor by Removing K Elements
Data Structures & AlgorithmsMedium

Follow-up to the previous problem: Given an array and a corresponding array of cost factors, find the maximum sum by removing k elements from either end, where the sum is calculated as (array value * cost factor).

Q3
Create Complete BST from Sorted Singly Linked List
Data Structures & AlgorithmsMedium

Create a complete Binary Search Tree (BST) from a given singly sorted linked list. The problem was left open-ended, and the interviewer wanted me to ask clarifying questions and present working code. Here, we need to utilize the properties of a complete tree and a BST.

Q4
Text Justification Minimum Lines
Data Structures & AlgorithmsMedium

Given a text and a fixed page width, determine the minimum number of lines required to fit the text on the page. Word integrity must be maintained (words should not be broken across lines), and any remaining space on a line if a word doesn't fit should be left blank.

Q5
Minimize Table Height with Two Columns
Data Structures & AlgorithmsHard

Given two strings of data that you would like to put into a two-column table on a fixed-width page. Find the column sizes (or the index of the partitioning line) that minimize the overall height of the table. (Example: consider creating a two-column table in MS Word, you can move the partition line between 2 columns so that table height is impacted. You need to return the index of that partitioning line which minimizes the overall size of the table).

Q6
Design a Task Scheduler
System DesignHard

Design a scheduler that supports acceptTask, removeTask for all users, and getNextScheduledTask. Each task has an associated dueTime by which it needs to be completed. The problem is ambiguous and requires clarifying questions with the interviewer. The expectation was to write nice modular, workable, and optimal code.

Q7
Favorite Solved Problem and Satisfaction
Behavioral

Describe your favorite problem that you have solved. Were you satisfied with the end result? Be prepared for many follow-up questions.

Q8
Cross-Team Collaboration and Conflict Resolution
Behavioral

Describe your experience teaming up with different teams. Were they willing to help you? If you weren't getting the help you needed, how did you resolve this?

Q9
Addressing Peer Exclusion
Behavioral

What would you do if you observed a peer feeling left out?

Q10
Workload Management and Stress
Behavioral

Describe a time you had trouble managing your work or experienced stress. How did you handle it?

Q11
Pushing Back on Manager
Behavioral

Describe a situation where you had to push back on your manager.

Q12
Transitive Parents in Category Graph
Data Structures & AlgorithmsMedium

Given a hierarchical graph structure of categories (e.g., electronic, wireless, telephone), and an input category (e.g., 'Iphone', which belongs to 'Smartphone'), return all its transitive parent categories (e.g., Output: (1,2,3,4,5) representing all transitive parents). The graph structure can be referred to in the image context.

Q13
Design and Model Category Filters
System DesignHard

Given a hierarchical category graph, design and model a filter class that can process complex filtering conditions. Examples include: 1) Marking down all telephones that are not wireless devices. 2) Marking down all communication devices except wireless devices. The interviewer focused on designing and modeling this filter class and how it would be converted. The graph structure can be referred to in the image context.

Q14
Shortest Path in Graph with Locked Nodes
Data Structures & AlgorithmsMedium

Given a graph structure with a source and a treasure node, where some of the graph nodes are locked. It takes one unit of time to move from one node to another. You cannot move via locked nodes. Return the minimum amount of time taken to reach the treasure from the source.

Q15
Unlock Minimum Nodes for Path to Treasure
Data Structures & AlgorithmsHard

If the treasure is unreachable from the source, determine the minimum number of locked nodes that must be unlocked to create a path to the destination. Time is not a factor; the objective is to minimize the cost, where cost is the number of locked rooms in the path.

Google | L5 | India | Dec-2021 | Offer
google logo
Google
SDE IIIindia12 yearsOffer
December 8, 202141 reads

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)

Q1
Stream Processing with Mathematical Functions
Data Structures & AlgorithmsMedium

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.

Q2
Design with Signed/Unsigned Integers and Overflow
Data Structures & AlgorithmsMedium

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.

Q3
Design a System Similar to S3
System Design

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.

Q4
Describe Interesting Technical Work
Behavioral

Tell me about an interesting technical work you have done recently. This involved a detailed discussion for about 15 minutes.

Q5
Design for Random TCP Packet Processing
System Design

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.

Q6
Describe a Technically Challenging Problem
Behavioral

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.
Google | Test Engineer | Warsaw | Oct 2021 [Pending]
google logo
Google
Test EngineerWarsawOngoing
November 16, 202155 reads

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)

Q1
Number of Islands (Varied)
Data Structures & Algorithms

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.

Google | Level 3 | Bangalore, India | Jan/2021 | Offer (L3)
google logo
Google
software engineer l3bangalore, india3.5 yearsOffer
June 26, 202139 reads

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)

Q1
Decode String (Variation)
Data Structures & AlgorithmsMedium

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.

Q2
Project Discussion and Hypothetical Situations
Behavioral

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.

Google | Software Engineer L5 | Seattle | Sept 25, 2020 [Offered]
google logo
Google
L5 Software EngineerSeattle, WA8 yearsOffer
October 28, 202045 reads

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)

Q1
Binary Search Algorithm
Data Structures & Algorithms

A coding problem requiring the implementation or application of a binary search algorithm.

Q2
Topological Sort
Data Structures & Algorithms

A graph problem requiring the application of a topological sort algorithm.

Q3
Shortest Path (Dijkstra's Algorithm)
Data Structures & Algorithms

A graph problem requiring the application of Dijkstra's algorithm to find the shortest path.

Q4
Dynamic Programming Problem
Data Structures & Algorithms

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.

Google | SWE L4 | NYC | September 2020 [Reject]
google logo
Google
SWE L4NYC8 yearsRejected
October 2, 202044 reads

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)

Q1
Contains Duplicate II
Data Structures & AlgorithmsMedium

Given an integer array nums and an integer k, return true if there are two distinct indices i and j in the array such that nums[i] == nums[j] and abs(i - j) <= k.

Q2
Blackjack Probability of Busting
Data Structures & Algorithms

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.

Q3
Minimum Window Subsequence
Data Structures & AlgorithmsHard

Given two strings S and T, return the minimum window in S which has T as a subsequence. If there is no such window, return the empty string.

Q4
Anagram Pair and Smallest Non-Anagram Number
Data Structures & Algorithms

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.

Q5
Googliness Behavioral Interview
Behavioral

This round focused on behavioral questions, often referred to as 'Googliness', assessing leadership, teamwork, handling ambiguity, and how I demonstrate Google's core values.

Q6
Maximize Minimum Distance Path in Grid
Data Structures & Algorithms

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.

Google | SE (L4) | Bangalore | August 2020 [Offer!!!]
google logo
Google
Software Engineer L4Bangalore, India5 yearsOffer
August 11, 202050 reads

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)

Q1
Triangular Array Operations
Data Structures & AlgorithmsMedium

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.

Q2
String Manipulation with Edited String
Data Structures & Algorithms

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'.

Q3
Advanced String Problem (Suffix Tree Related)
Data Structures & AlgorithmsHard

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.

Q4
Matrix Grid to Graph Shortest Path
Data Structures & Algorithms

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.

  1. Understand the Problem: Clarify edge cases and expected outputs with the interviewer.
  2. Think Out Loud: Share your thought process, even if unsure. This helps the interviewer guide you if you're off track.
  3. Start Simple, then Optimize: Begin with a basic approach and then iteratively think about optimizations.
  4. Code with Edge Cases: Ensure your code covers all edge cases.
  5. Review/Dry Run: Always review and dry-run your code with test cases before declaring it complete; this helped me find most bugs.
  6. 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
Google | L4 | Rejected
google logo
Google
SDE II8 yearsRejected
March 11, 202039 reads

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)

Q1
Dice Number Representation
Data Structures & Algorithms

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
Given any number, you need to find the optimal way to represent it with the smallest number of representable numbers.

Q2
Max Sum Path in Matrix with Barriers
Data Structures & Algorithms

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.

Have a Google Interview Experience to Share?

Help other candidates by sharing your interview experience. Your insights could make the difference for someone preparing for their dream job at Google.