Google · Onsite
In processGoogle New Grad NYC R2: Signed-Offset Stream Selection and Colored Binary Trees
Role: Software Engineer, New Grad
Result: Awaiting final result
Report time: January 2026
Onsite location: New York City
R2 contained two technical interviews. The candidate found both easier than their R1 coding round and emphasized collaborative discussion with the interviewers.
Coding 1: signed-offset array selection
Given an array and an offset:
- If the offset is positive, return the first
offsetelements. - If it is negative, return the final
abs(offset)elements.
Example: for [a,b,c,d,e], offset 2 returns [a,b]; offset -3 returns [c,d,e].
The follow-up changed the array into a stream exposing only hasNext() and getNext(), while the offset remained fixed. The last-k case used a queue.
Practice: Select First or Last K Stream Words
Coding 2: valid binary tree root
Given an undirected acyclic graph, determine whether it can represent a valid binary tree and, if so, return its root.
The follow-up colored each node black or white and asked whether there exists a valid binary-tree rooting where every depth level has one uniform color.
Practice: Alternating-Color Binary Tree Roots
Comments
0No comments yet — be the first to share what you know.