Google New Grad Onsite

5 Rounds of Interview.

  1. Simple question involving pushing and popping elements off a queue.
  2. Given array, check if there’s an arithmetic sequence of length 3. Follow up: given an array, return the length of the longest arithmetic sequence. Similar leet code question ( I gave an N^2 solution for part 1, and gave an N^3 solution for part 2. Optimal solution for part 2 ended up being a N^2 dynamic programming solution.

LUNCH BREAK - walked around with a googler to tour office

  1. Given an array of pairs of floating point numbers, which represent points that lie on a unit circle, sort them in counterclockwise order. You can choose an arbitrary start point as the ‘smallest’. At the end, I had like 6 minuites left, and the interviewer said ‘we don’t have time for another coding problem,’ and asked me some theoretical questions on sorting instead. He gave 5 run times in Big theta notation and asked me to rank them from worst to best. And then asked me for comparison based sorting algorithms, what is the best possible runtime, and why.
  2. Graph problem similar to this: The problem was somewhat cryptically phrased, but it went something like: Given a m by n grid, fill the grid with random paths. Return the result as a tree.
  3. Graph problem similar to this:

Applied online. Took over a month to first hear back. After that, took 3.5 weeks to get an offer. Onsite interviewers seem not to have coordinated with each other about what problem they were going to give, as I was asked multiple times to tell them if another person already gave the question.

Got leetcode premium and did 47% of the ‘Google interview’ collection to prepare, as well as a few other hard level problems that weren’t in the collection. Overall, I would recommend the ‘Google interview’ collection for preparing.