Google Early Career II (US) Onsite
- Location
- US
- Posted
- 12 Jul 2025
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.
How it went
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)
Questions asked (3)
- 01
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]]
- 02
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.
- 03
Merged Intervals (Tweaked)
Data Structures & Algorithms
Merged Interval (Tweaked a little)