How I got into Google!!

Gourav Mittal
9 min readNov 25, 2019

This year I planned to switch my job and interviewed with 7 different organisations: Adobe, GoJek, Acko, Amazon, Goldman Sachs, Google, Booking.com

Offers: Adobe, GoJek, Acko, Amazon, Goldman Sachs, Google.

Rejects: Booking.com (as I didn’t have system design experience, they decided not to process my candidature after first online coding round).

I finally went ahead with Google.

Now, there were a lot of questions asked by people regarding my schedule, preparation plan etc. I’ll try and answer as much as I can and everyone is welcome to give me feedback, ask questions and topics I might have skipped in the comments below.

Let’s start with a statement by Warren Buffet,

“An idiot with a plan can beat a genius without a plan.”

Information Gathering

In general, there are following aspects to interviews:

1. Competitive Coding

In a nutshell, I solved about 50 questions in InterviewBit, 50 in Codeforces, 50 in Topcoder and 360 in Leetcode. Now how to choose which problems one need to solve? First, make a list of your stronger and weaker areas. For me it was something like this..

Strong: Trees, Recursion, Weak: Almost everything else :P (graph theory, bit masking, dynamic programming, algorithmic design, Range queries, Arrays, String and many more.. you can find a comprehensive list of topics on leetcode).

Idea is you should clearly lay out your current situation on paper. This will clearly help you define areas you need to attack. Now of course solving questions is not the only thing that’s gonna help. You’ll need to work on your theoretical concepts as well. I believe there are multiple ways to do it. You can read blogs on codeforces and topcoder. They are simply amazing. You’ll learn so much that you might not want to stop.

Say you are weak at dynamic programming. Search for blogs on Google for dynamic programming on codeforces / topcoder. You definitely will have many links and will need to go through few of them to understand which one’s good. Initially you’ll face issues but after few iterations, you’ll automatically start to land on the right pages. So, for dynamic programming I read this [ https://www.topcoder.com/community/competitive-programming/tutorials/dynamic-programming-from-novice-to-advanced/ ]. This is an example.. You can do it for graphs, bit mask etc.

Once you have clarified your theoretical concepts and associated examples, go to your favourite coding platform. Personally, I solved few problems on codeforces first and then topic wise questions on Leetcode. I continued this strategy for about 8 weeks and covered almost all the major topics (I call it covering the breadth).

Then I bought the premium subscription of Leetcode. It gave me access to company wise flagged questions, frequency of questions and mock interviews. Now, since my target was getting into Google, I opened up Google questions, sorted them by frequency in decreasing order and started to solve them from the beginning.

Occasionally, you’ll get stuck on questions, we all do. At that time go for Hints, Related Topics. They sometimes helps you to think better. If you feel that your current topic is still weak, open it, sort by frequency in descending order and start solving. Once you have gained confidence again, go back and re-attempt. Still if you get stuck, use the discuss forum, read the solution of others, and attempt again. Just don’t feel demotivated, no one becomes a great coder over night.

There’s a saying (I don’t remember the exact words, but here you go);

“An author becomes a good author by reading the books of other good authors, similarly a coder becomes a good coder by reading the codes of other good coders.”

Read the codes and solutions given by other people in the discuss forum for every question you solve, even if you solved them in the first attempt. I personally learnt a lot from there. You’ll find so many general ideas that using those ideas repeatedly, you won’t have to remember most of the things.

And that’s it. This is the general idea to improve your coding skills. Always focus on quality and not quantity. You don’t necessarily have to solve 500+ questions as I did. I was very weak in competitive coding. You might be good. Just ensure whatever you do, you get the crux of it. Always make note of your mistakes and try not to repeat them again.

You’ll also find options to create lists in Leetcode. I relied on them heavily. I marked questions I could not solve or I found worth solving again in separate lists and went back to them every few weeks. I strongly recommend doing that. And don’t cram the solutions, understand the concepts thoroughly. Solve questions until you are confident enough. Don’t have short term goals like getting into Google or Amazon in 6 or 8 weeks. Rather focus on your skills and rest everything will follow.

One more thing, practice questions on paper first. Try to write a clean and working code. Emphsize on the signature of the function and don’t use i,j,k as variable names. Use existing libraries of the language e.g. STL in C++.

b. Design

There are ample amount of resources out there for learning design. I’ll share my findings:

  1. System Design playlist by Gaurav Sen(guy’s a legend).. https://www.youtube.com/playlist?list=PLMCXHnjXnTnvo6alSjVkgxV-VH6EPyvoX
  2. https://www.educative.io/courses/grokking-the-object-oriented-design-interview
  3. https://www.educative.io/courses/grokking-the-system-design-interview
  4. Tushar Roy https://www.youtube.com/user/tusharroy2525 (he’s good for clearing coding concepts as well)

Design is based on your experience as well, your sixth sense and understanding of how things work. Initially every next term will be a jargon, but keep on reading, you’ll eventually get the hang of things.

c. Work Projects

I don’t really need to touch on this. I’ll just suggest don’t say or write anything stupid on your resume. Your interviewer might not know about your project but he/she is not stupid. Be honest about your work and be confident in explaining what you’ve done.

Try some mock interviews with your friends, explain it to them, and get feedback and keep on doing until you’re confident.

d. Leadership Principles

This is one area I won’t be able to help you with. It really depends on your mindset. I never prepared for these. I was always honest about how I felt given some situation and that’s it.

Interview Structures and type of questions

a. Competitive Coding

In general, I didn’t find any organisation asking hard questions. But it’s always good to be prepared. If you ask me, it always helped to level up. Once the interviews are scheduled for an organisation, I used to open questions of the same on Leetcode and solve for 2–3 days before interviews, just to be confident. Also, do attempt mock interviews. They will really help and prepare you for timely delivery of solutions.

I observed graphs, arrays, trees, backtracking were the major topics of discussion. So, make sure you are good with those.

Always state your assumptions clearly. Let’s say the question is, Given two different sequence of numbers (2 lists), combine them and return them in sorted order.

  1. One approach could be append 2nd to another and sort it. Complexity of this will be O((m+n)log(m+n))
  2. (Better way) Ask your interviewer if the lists are sorted, if so, apply merge operation of merge sort. Complexity will now be O(m + n), if sequence is sorted. If not, anyways you have the above solution. With this we have ensured there are no loose ends.

This might be a very subtle example. But I think you understood the point.

b. Design

Luckily I could clear all of these with the ideas I learnt from above shared links. Nothing more, nothing less. I suggest go through all of them.

Few things to take care of. Let’s say your interviewer asks you to design Uber.

  1. First clarify the scope of the problem. I mean you only have 45–60 minutes. As a result, there’s only a subset of Uber system you can design. So, ask questions and clarify and understand what does the interviewer wants you to do. Don’t jump to a conclusion because you already know the solution to the problem.
  2. Ask as many questions as you want and state all assumptions clearly. Ensure all parameters are clear in your mind.
  3. Then start working on design step by step taking your interviewer into confidence, so you are in sync.

c. Work Projects

From my understanding and findings, interviewers are interested in your knowledge of the modules you have worked upon. Depending on how interesting your project is and their knowledge of the domain, they can go as deep as they want. But my advice will be, ensure that you know in and out of the modules you stated in your resume.

d. Leadership Principles

A simple Google search will give you better idea about this. One sample question would be “Explain a situation where you had conflict with your manager. What was your reaction to the situation? How did your manager react?” and many more.

Again, say what you feel and don’t beat around the bush.

Planning

Planning is must at every stage. From preparation to scheduling of interviews. Don’t schedule all your interviews once. Plan them and give it one after another. Have a set goal where you want to land up at last and interview with that the last, so you have enough practice to handle pressure in interviews.

I gave it in the following order,

  1. Adobe, Acko, GoJek, Booking.com
  2. Goldman Sachs, Amazon
  3. Google

Every offer will give you the confidence and with every rejection you should understand that you need to work harder. My whole point is, don’t let demotivation kick in, there isn’t just room for it.

Streamline things. Don’t start working on all of things at once. I mean if you are working on some data structure or algorithm, finish it and once done, then go to another.

Also, there’s no single strategy that works for all of us, you need to devise your own. That was my strategy and it worked pretty well for me.

So, my last advice, give your 100% because that’s what you can do the best. A very good friend of mine told me just before I started,

“The harder you’ll work, the luckier you’ll get.”

And that’s it!!

Few questions I got:

Q1. How did you manage your time along with your job?

Ans. I just happen to make time. I did my 500+ questions and design in over 5 months, and I worked day and night. Look, you need to set your priorities first. You cannot do and be good at everything. I made a deal with myself to spend 4–5 hours at least every day for preparation, for that I even reduced my sleeping hours to 5 for 2 months. It might be impractical but you need to compromise somewhere by taking time off from your schedule.

Q2. How did you measure the space and time complexity of your solution, and get in agreement that it is the best possible and don’t have to iterate further?

Ans. For starters you need to read and understand Master’s theorem (read it on GeeksforGeeks or Wikipedia), then read standard algorithms, analyze their complexity (because they can be easily verified). You’ll slowly and gradually understand how to judge the complexity of any given algorithm.

Now, when you solve any problem, measure the complexity to the best of your abilities, then read the solutions by others and see if they have done it better in terms of space or time and learn and do it for every question that you solve. You’ll eventually get the hang of it.

Q3. How did you land the interviews?

Ans. I went by referrals. I searched for connections in the organisation I wanted to interview with on LinkedIn. Then I would request for a referral.

Not all people are willing to provide their referral and we should respect that and search for someone else in that case. Be gentle and professional.

Q4. How to improve problem solving abilities, solve difficult problems in less time?

Ans. Practice, there are no shortcuts.

Q5. Do I need to participate in coding competitions?

Ans. Yes, definitely. They’ll help you improve on solving problems in timed environments. You can start with Leetcode’s weekly contest.

Q6. How much time did you spend on each question and how many questions a day?

Ans. I never worried about time. My first goal was always to solve the problem. Timing just improved automatically. Again same goes for number of questions as well. Focus on quality and not quantity.

Some might feel this is contradictory to above answer. But they are both important aspects and you’ll see results over time in both the areas.

Q7. That’s okay, but I get tired after such a hectic long day?

Ans. Honestly I get tired too. I mean we are not robots. But when you really want to achieve something, the inner desire will keep you going.

I shared so many quotes in the article. They might seem only quotes to most of you today, but I promise once you’ll achieve your milestones, they’ll make all the sense in the world.

P.S.: Sorry, I got so many messages that I missed the other questions. If you have some, please comment or send me on LinkedIn again and I’ll be happy to answer them and include it here. I hope it gave you some insights :)

--

--

Gourav Mittal

Software Engineer at Google, Mountain View | Wannabe cataplexic