My Competitive Programming Journey To Google

We weren’t going to make the same mistake again, so this time we did a lot of team virtual contests and individual mashups (Thanks to Ashishgup) at Codeforces, during which I also became a Candidate Master (or as I like to call it “Candidate Freaking Master” XD) on Codeforces.

(My favourite acheivement).

We participated in 2 regionals, Pune and Kolkata and got ranks of 36 and 16 respectively.

There’s always a feeling of “We could have done better” but I was quite happy with it.

My interview experiences:One of the biggest perks of being a good competitive programmer is that you’re likely to get a lot of interviews.

Here’s my experience interviewing at companies through competitive programming:Codechef Intern (May 2018):I was asked to build a web application similar to Instagram with lesser features.

I didn’t know anything about web application development then and it took me too long to complete the project.

By the time I was able to complete the project, they had already decided on their interns, so that ended quickly :(Sharechat Intern (August 2018):Sharechat used to sponsor contests on Codechef and I was called for an interview through one of those.

Round 1 was an algorithmic round of around an hour, it had 4 problems, I was able to solve 3 completely and was able to solve the 4th one for some specific case.

I was told that I had cleared the round but they were not looking for interns anymore (Tough luck eh?).

CodeNation FTE (September 2018):I was called for an interview through CodeNation’s contest CodeAgon on Hackerrank.

The first round was a project discussion round where the interviewer asked me to explain about any one of my projects (I probably chose the wrong project to speak about).

There was no update after the interview (I guess it’s obvious what that means).


net Intern (December 2018):I had cleared CCDSAP Advanced level which allowed me to qualify directly to the second round of interviews.

The round was based on DSA of around an hour in which I was asked a graph problem with DSU, it took me the entire duration of the interview but I was able to solve it.

So, I cleared the interview and reached the final interview.

My happiness was short lived as I was grilled for 2 hours straight in the final round.

It covered DBMS (went well), project (was okayish), System design (screwed up).

And again, I was rejected.

Google UK (November 2018 — March 2018):This is probably what you are reading the blog for.

Interviewing at Google was a long process.

I was ranked 36 globally in google’s kickstart round E (August 2018) and was expecting a call through it, but that never came.

On one random day in November, I received a mail from a Google EU recruiter who had come across my profile on Hackerrank.

We had a short conversation and I was scheduled for an online coding interview for mid December.

Since this was also when I was preparing for ICPC (I used to do a lot of coding contests practice for it), I felt like killing two birds with one stone!Note: I’m not allowed to share the problems so will be only referring to the categories under which they fall.

Online round 1 (Coding):I was asked a backtracking problem, (initially an easier sub problem) which was easy to think of but harder to implement.

I was able to write the code for it but realised there were a few bugs in it only after the interview.

I was told that even though I was able to solve the problem, they were not too happy with the coding structure (Coding practices not being followed and buggy code), so I was scheduled for another online coding interview.

I was again given a months time to prepare for it.

Online round 2 (Coding):I prepared for this round by the usual “Participating in coding competitions” strategy, but also gave a few mock interviews on Pramp and focused a bit more on writing better structured code.

In the interview, I was asked 2 problems, the first one was based on linked-lists while the second one was a more interesting math based problem.

I was able to solve both the problems with decent implementations and clear the round.

I was called for the onsite interviews (4 coding + 1 system design) and had been given another month to prepare for it.

I prepared for onsite interviews by reading about and watching a lot of videos on system design (After my experience at Media.

net, I wasn’t going to take it lightly).

I also solved a lot of Google interview problems at Interviewbit followed by a few mock interviews.

Onsite rounds:I’m not a very punctual person, but definitely not the kind to be late for such an important event.

I was in the Google office at the right time, BUT the wrong Google office.

I didn’t know Google had 2 offices in London just a couple of miles apart, which meant I had to rush to the correct office, as a result, I was late, that made me really worried but the interviewer was very polite and rescheduled the first interview to be taken after the last one (Apparently he had made the same mistake as I did during his interviews).

Round 1 (Coding):The interview started with an easy encoding problem which I was able to implement quickly but then was asked to implement the reverse problem as well (decoding) which was harder to do.

I initially wrote a buggy solution but I think I was able to fix most bugs before the end of the interview.

Round 2 (System design):This was the round that I was most worried about because of how vast it is.

It was about handling logs in a distributed system.

I think I did pretty average in it, I was able to come up with a workable solution with some calculation mistakes (GBPS and gbps is confusing XD) which was pointed out by the interviewer which meant I was able to fix those.

Round 3 (Coding):The problem asked in this round was related to binary-search, although I was able to solve the problem but was asked about parallelizing the code to improve upon a bottle-neck which I didn’t really know how to do.

This round was probably my worst round.

Round 4 (Coding):This was my favourite round.

It had a nice DP problem with some clever optimisations.

Unlike other rounds, I was asked to implement a really naive solution and then asked about optimising individual components.

It was quite fun and at one point the interviewer even said “Not many people are able to get that optimisation” which was a really nice thing to hear.

Round 5 (Coding):This was the last round, I was asked a tree problem which had a pretty intuitive solution, followed with some follow up question with slight modifications.

It took them a couple of weeks to evaluate and I was offered a job as a SWE-SRE in Google UK.

Suggestions about competitive programmingTo be honest, there are a lot of resources available on the internet and I don’t really have anything unique to add.

Just keep practising, up-solving and have fun!.Don’t worry about failures and rejections, they only make you stronger.

Here are some good blogs about competitive programming:Getting started with the sport of competitive programmingHow to prepare for competitive programming?How can I become good at competitive programming?Before I end the blog I’d like to thanks a few coders:Mehul_Dholiya : For getting me started with competitive programming.

Ashishgup : For hosting mashups and helping me practice better.

Vivek_1998299 : For being a great team mate and rival.

Swetank : For always sharing his gyaan (especially before interviews).

Sinus_070 : For his support and help throughout the interview process at Google.

And also everyone else who has been helpful throughout the journey! :).

. More details

Leave a Reply