Google | L3 | Europe | Jan 2022 [Reject]
Anonymous User
1694

I’m sharing my first experience interviewing with Google.

My profile summary:

  • 1 YOE (2 including internships)
  • Leetcode problems solved: 113 - 25/78/10

I’ve had a first call with the HR and scheduled the first phone interview 4 weeks later to give me time to prepare. Google is pretty flexible with interview dates, so don’t be afraid to ask for more time. I’ve never practiced leetcode problems seriously prior to this interview but I started grinding as soon as the process started.

Phone interview 1 (45 mins):

Basically Detect squares
The interviewer was really nice and I was pretty nervous since it was my first time interviewing with a company of this caliber. I was a bit stuck, the interviewer gave me some hints and I gave a pseudo code solution as I didn’t have time to finish it and I spent the majority of the time talking about the solution. I haven’t done well in this interview.

Feedback: One week later, the HR called me, she said the feedback was mixed. Algorithms, data structures and communication was good but the coding part was messy. She gave me another chance to reassess my skills with a second phone interview and I was very grateful for that.

Phone interview 2 (45 mins):

Top K Frequent words + input parsing
I solved the problem with a map and a priority queue. Then, I answered the follow-up questions he asked.

Feedback:
Communication was good, clean code, clean structure but the interviewer thought I was a bit slow, he said he didn’t have time to ask all the follow-up questions. Though, we spent a bit of time small talking at the beginning (which I shouldn’t have), I think I would have enough time to answer all the follow-up questions if I didn't.

On site interviews 5 rounds (45 min):

Coding 1 :

Given 2 strings s1 and s2, return the number of black pins and white pins.
+1 Black pin if characters are equal at the same index.
+1 White pin if characters are equal at different indices (cannot use the same index twice)

Example: string a = “OORBB”, string b = “RAOB”
nb of black pins = 1 (’B’ at the last index)
nb of white pins = 2 (’O’ and ‘R’ are at a different index in both strings)

I counter black pins first, and counted white pins afterwards with a frequency map.
I missed a corner case, asked me to recheck and I spotted it out and fixed it.

Follow up questions: time and space complexity. Each character represent a color, what if we had more colors than a char can represent, what would you change ? How many values can you have with a char ?

Behavioral:
Classic questions: What would you do given X situation or tell me a time when X situation happened, what did you do ?

Coding 2 :

Similar to Find and replace in string.

I made slight careless mistakes and haven’t handled all the edge cases but had them fixed when he made remarks.

Follow up questions: recursively check and replace if a substring of dst is present in src (pseudo code). infinite recursion detection, error handling.

Coding 3 :

Step-By-Step Directions From a Binary Tree Node to Another

The interviewer said it’s the first time he’s seen this solution and he thought it was interesting.
I took advantage of the fact that a tree is a specific directed graph, so I created an undirected graph from the tree and did a bfs to find the shortest path.

Follow up questions: time complexity

Coding 4 :

Given time intervals, return the list of rectangles that would appear in Google calendar. A rectangle can be represented by 2 points (diagonal), the width of the calendar is constant.

Example: input [[10,12],[9,11],[11,13]], width = 50

image

Output = list of 3 elements (3 rectangles). Each rectangle are represented by 2 points; if we have the coordinates of two diagonal points, getting the two other coordinates is trivial.
Output = [[[0, 9], [25, 9]], [[25, 10], [50, 12]], [[0, 11],[25,13]]]

I struggled to understand the problem and to verbally explain my solution step by step. I’ve spent around 15 minutes doing so. But I still managed to solve it at the end and answered some follow-up questions.

Follow up questions: he gave me an alternative way to display the calendar and asked for its algorithm, time complexity, how would you test your solution ? what edge cases can you think of ?

Final Feedback: One week later, the recruiter called me and I got rejected. To be honest, I thought I didn’t do too bad as I found a decent solution to all the problems. I expected at least to be presented to the Hiring Committee but the recruiter told me that my results were not good enough for that: the main reason of my rejection was due to speed but the third coding interview went pretty well.

I was kinda surprised because I solved all the problems and I also had time to answer follow-up questions.

Were the questions I had easy enough so that I should have time to solve 2 of those ? Maybe they expect a good candidate to be able to code the follow-up questions as well ? I have answered the follow-up questions verbally, but I don’t think I would have time to code them if he asked me.

Let me know what you think.

Comments (2)