Google L4 | Interview Experience | India | Fullstack
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. Givenn 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 functionstring 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)
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.
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
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"
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)
- v1: min=14, max=+∞, order=1
- v2: min=-∞, max=8, order=2
- v3: min=12, max=16, order=3
- 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.