Google · Onsite
In processGoogle Early Career Onsite: Top-K IPs, Tree Cut Cost, and Equal-Endpoint Subarrays
Role: Software Engineer, New Grad / Early Career
Result: Entered Team Match
Report time: June 2025
Application: Referral
The candidate applied without an OA or phone screen. Four virtual-onsite rounds were split across June 10 and June 18 after three of the original sessions had to be rescheduled.
Coding 1: Top-K IP addresses
A file contains IP headers. Return the ten most frequent IP addresses using a priority queue.
For frequency ties, the follow-up grouped output as nested pairs of frequency and the complete list of IPs having that frequency, using a bucket-style approach. An open-ended follow-up asked what to do when memory cannot hold the full file.
Practice: Top-K IP Addresses From File Records
Coding 2: minimum root-to-leaf cut cost
The candidate solved a tree-cost problem with recursive DFS. Follow-ups changed the tree to N-ary and allowed negative costs, requiring consideration of every valid combination of cuts rather than a simple positive-cost recurrence.
Practice: Minimum Root-to-Leaf Cut Cost
Coding 3: maximum subarray with equal endpoints
Find indices i <= j maximizing the sum of a[i..j], subject to a[i] == a[j]. Values may be negative.
The candidate moved from brute force to a HashMap plus prefix sums.
Practice: Maximum Subarray Sum With Equal Endpoints
The behavioral questions were remembered only as standard experience and hypothetical prompts. Nine days after the final interviews, recruiting confirmed Team Match and requested a transcript during the wait.
Comments
0No comments yet — be the first to share what you know.