Data Structures and Algorithms: How I Failed a Google Interview

Data Structures and Algorithms: How I Failed a Google Interview

Some years ago, I was interested in getting a job at Google. At first, it was just a thought, but then I decided to go for it. I understood that it would not be easy, and I spent a couple of months sending in my CV for many different job positions. Little did I know that I was setting myself up for a failed interview.

Every day when job hunting, you have to go to a Linkedin page or a company website and monitor what positions they have and whether these open jobs match your skills or not. This can be very interesting. You can understand which specialists are needed and what the job trends are.

First interview call

One day, I found an email from the Google HR team; they were interested in my CV and wanted to discuss an opportunity with me. WOW!!! That was my first reaction and most considerable emotion of that day. I couldn’t believe that this was happening. I quickly replied, and we scheduled the first call.

In all such activities, the first call is an introduction call with HR. It’s just for 15-30 minutes. During this call, HR will tell you about the interview process, ask some general information about you, and answer your questions. I had an excellent small talk with the HR manager, and after the conversation, we scheduled the first tech interview.

The technical interview

The interview process with Google consists of several steps: an introduction call, a pre-tech interview call, and an on-site interview (or online as it was during the COVID period).

My first pre-tech interview call was with a guy from Norway. One of the great plusses of such calls is that you can speak with people from any part of the world. This interview was easy. We just discussed some basic topics and some real-life cases.

For example, one of the questions was how we can implement a loading spinner, and you need to provide some variants: CSS, simple word Loading, a variant with Canvas, or any other of your ideas. The main thing is to give some variants and discuss the plusses and minuses of each approach. This interview took 45 minutes, and after that, I received an invitation to an on-site interview.

On-site interview

An on-site interview is not a single conversation. It’s a series of interviews, 5 or 6 based on your target position. And all these interviews take place in 1 day usually. You just have 5-6 interviews, one by one, with a break for lunch. Usually, it will be 4 tech interviews, 1 interview about system design (for senior positions and higher), and a behavioral interview.

I personally had 5 interviews, but one of them was canceled as the interviewer didn’t have a chance to join the session. All these calls take about 45 minutes.

The first one was with a guy from Japan, a very smiley person with perfect jokes :). The task for this call was to check if the target words were anagrams of each other. Here, it is probably worth talking about what the main tasks in these interviews are; tasks with data structures and algorithms. And I started to prepare for this too late – don’t wait to prepare – that’s how you have a failed interview.

As a self-educated developer, I had never learned data structures and algorithms before. This was my main mistake in my self-education process and during my first years working in software development. I started to learn all these just before these interviews.

But let’s go back to the story. As I mentioned, the first task was with anagrams, and I could resolve it.

The second interview was with a nice woman from Hungary. She told me that she previously worked for Fitbit, but it was acquired by Google. My task for this call was with queue and map structures. The idea was to implement the logic of queues in restaurants where we have some free spaces and groups of people in the queue. I also resolved this task successfully.

The third call was canceled, as I told you previously.

Failure to prepare

The last tech call this day, but not the last interview, was with a guy from Denmark. The main task was with graphs, and this was a total failure because I didn’t have enough time to learn and understand this structure and the main algorithms to work with it.

The last session was behavioral. During a behavioral interview, the company tries to understand what type of person you are. How will you work in a team with people of any background, will you comply with the company policies, your motivation, etc.?

They can ask you about various situations and how you will do in them. The interview was a very interesting one with a guy from Spain. We discussed many interesting cases and some funny stories.

After all these interviews, I waited for 1 week for the final results. And, I think, as you already have guessed, the final result was negative. I got feedback that all the interviews were good, except for the call where we discussed graphs. Due to this, we couldn’t continue the process.

Of course, I was sad, but I’ve taken some lessons from this story. It is very important to learn and understand data structures and algorithms. And not only for interviews but also for your better understanding of how they work and how we can use them in our everyday work.

This article was written by Roman for HackerNoon and was edited and published with permission.