R1:
Technical interview. The interviewer was a senior frontend engineer. We did a bit of small talk up front, then went straight to the coding link.
Q1: Given a binary tree, output all the nodes visible from the right side. I used BFS — each round, take all the nodes at the current level, output the last one, then push all the nodes of the next level into the queue.
Q2: Given two arrays arr1 and arr2 and an integer k, find the k smallest values of arr1[i] + arr2[j]. I used a heap — first push arr1[i] + arr2[0] into the heap, then every time I pop the smallest (i, j) from the heap, push (i, j+1) as the new pair, until I've popped k numbers total.
Google's pacing and time control were both pretty good — it basically wrapped up right at the 45-minute mark. I gave fairly detailed reasoning/comments on both coding questions, no real issues, very chill overall.
R2:
This round was pure behavioral, and it started right away. Honestly it didn't feel like they asked that much, but somehow 45 minutes still went by, lol. The behavioral questions were also pretty random — a few of them: why Google?, most exciting project, tight deadlines, your college life, that kind of thing. Every question was something I'd prepared for in advance, and the hints given were pretty solid too.
You can check previous Google interview write-ups for reference — this one was on the easier side.
Discussion
Loading comments…