My Preparation Journey for Google Interviews

Shantanu Kshire
The Startup
Published in
9 min readDec 24, 2020

--

Every Software Engineer aspires to create an impact with his/her technical prowess. The Tech giants of this world are an amazing workplace for techies to deliver experiences reaching billions of users.

Photo by Achintha Maddumabandara on Shutterstock

In my recent interview experiences, I attended multiple rounds and received offers from Google and Amazon. Over the past few years, the online community has helped me tremendously in preparation. With this post, I will share everything about my prep journey and contribute back my learnings. :)

SWE Interview Process

The process usually kickstarts with the shortlisting of a potential candidate by a company recruiter. Candidate then goes through initial screening round(s), which determines if he/she is a good fit for the role. Once this is cleared, a typical SWE Interview will be conducted in below stages.

  • Coding — 3 to 5 rounds
  • System Design — 1 round
  • Leadership Principles — 1 round

P.S. I will focus more on Coding round preparation since these occupy a greater portion of the interview process. However, we will briefly look into System Design and LPs in later sections.

A. Coding

Software Engineers often find themselves in challenging situations e.g. dealing with ambiguity, unclear requirements, breaking down complex problems, handling edge cases, finalizing approach considering trade-offs, etc. Coding interviews are one way to get a glimpse of these skills.

To keep it simple — Coding rounds are focused on Problem Solving with Data Structures & Algorithms. These questions tend to be tricky and provide valuable insight into the candidate’s analytical ability.

Become sharp at solving Data Structures & Algorithm problems. This skill is gained over time. There’s no shortcut; only real formula is consistency. Practice, Practice, and Practice until you develop a natural problem-solving skill.

Preparation Strategy

1. Estimate Preparation Time

This is often ignored and not considered necessary. I suggest calibrating your current hold on problem-solving in DSA. I looked into my stronger and weaker areas and did a rough estimate of preparation time. This estimation helped me prepare my mind for the long-term (or short-term) goal and kept the motivation up.

“Give yourself sufficient preparation time. Its always better to be over-prepared than under-prepared.

Total duration can vary depending on your expertise. At a broad level, I have categorized in below buckets.

  • Beginner — Can comfortably code in at least one programming language. Lacks basic knowledge of DS and Algos. Struggles (or takes considerable time) to solve Easy difficulty problems.
  • Intermediate — Good knowledge of DS and Algos. No problem with Easy difficulty. Can solve most Medium problems. Struggles with Hard.
  • Advanced — No problem with Medium difficulty. Able to solve most Hard problems.

I put myself at Intermediate level before interviews.

Preparation Time Estimate

2. Coding and Learning Platforms

LeetCode, InterviewBit, and GFG were my leading go-to platforms for coding practice. Before the interviews, I solved around 320 LeetCode, 80 InterviewBit, and 30 GFG questions.

Problem Difficulty Distribution

Medium difficulty problems are essential as most of your interview questions will fall under this category. Solving these will immensely improve your speed and problem-solving ability.

It’s important to start with a mix of Easy and Medium level question at an early stage. Begin with Hard problems once you gain an adequate level of confidence. Don’t get demotivated if you are unable to solve the Hard ones. These problems can take a longer time to practice and perfect. Whenever I felt overwhelmed, I came back to an Easy for a motivation boost.

Maintain a growth mindset. Every problem you are unable to solve is an opportunity to learn something new.

  • LeetCode: Without a doubt, one of the best platforms out there. The best thing about LeetCode is its community. Discussion forums are super useful and provide multiple approaches. Don’t think twice about opting LeetCode Premium; it’s totally worth every penny.
  • InterviewBit: I highly recommend following the Programming Track. Experience on this platform is closest to a real interview. Sometimes your code passes all test cases but might not be time/space optimal (as required during an actual interview). InterviewBit reports these submissions as suboptimal, providing you additional feedback.
  • GFG: I utilized this platform majorly for problem discovery and DSA fundamentals. Topic explanations and language tailored implementations are really good. GFG also has a decent collection of company and topic-specific problems.

I did not wholly rely on a single resource for learning. Each resource provided me newer insights. I kept a journal, always aggregating and expanding my knowledge along the way.

  • Algorithms Specialization: This Coursera track rocks! It has a total of 4 courses, covering all basic and a few advanced DSA Topics. Great for beginners.
  • Youtube: Video explanations are my cup of tea! Naming few channels with helpful content — Rachit Jain, Abdul Bari, Tushar Roy (awesome walkthroughs!) and BackToBack SWE.
  • CTCI & EPI: I used these as supplemental to preparation. These books provided me with a quick brush up on Theory & Problems. It can sometimes feel time-consuming to target individual topics here. Instead, I opted to cover the sections breadth-wise before interviews.
  • CLRS: Sometimes used to lookup pseudocode. Handy resource to gain in-depth knowledge on time complexities and theory.

Last but not least BaseCS articles by Vaidehi Joshi. She writes intuitive & straightforward explanations on several DSA topics.

3. Using a Timer

As the interview durations are getting shorter, it’s crucial to work on your problem-solving pace. Generally, a coding interview is 45–50 mins long and a candidate is expected to solve — 2 x Medium OR 1 x Hard OR 1 x Easy plus 1 x Hard Follow-up.

Even if you could solve the initial question but consume a longer time, this means you won’t have sufficient time to tackle the second one.

I used a timer to time myself during problem-solving sessions.

  • Medium Problem: 20 mins
  • Hard Problem: 40–45 mins

Beginners can choose to ignore this factor since getting towards a correct solution is obviously more significant.

4. Mock Interviews

I gave a bunch of mock interviews before the actual ones. These can prove quite beneficial. Failing early in a test environment gives you useful insight. It will help you to detect the gaps in your thought process. Try to rectify each mistake and get better with every mock interview.

“If you crack consecutive mock interviews, consider it as a positive sign.”

Paid Mock Interviews come with additional benefits. Especially, Post-interview feedback gives lots of details on the interviewer’s expectations.

5. Prepare a roadmap

Until now, we spoke a lot about different elements that can go into preparation. Now let us try to connect these pieces together and create a roadmap!

Consider below snapshot of my calendar, a month before interview.

Preparation Schedule

I split the entire preparation into a set of tasks/milestones. I assigned daily goals weeks (or even months) ahead of the interview. This method helped me to avoid randomness and prevent getting lost along the way.

  • On weekdays I could only allocate few hours as I was engaged in office work. I scheduled problem-solving sessions in this time-slot.
  • Theory topics were reserved for weekends when it was possible to dedicate a generous amount of time.
  • Closer to the interview, I scheduled Mocks. During the final weeks, I reduced coding sessions and focused more on reading CTCI and EPI.
Weekly Time Allocation

I know a lot of us have family commitments and full-time jobs. A forecasted schedule might not always go as planned. But the whole idea here is to generate a habit. Keep track of your progress and pending items. Continue tweaking until you find a schedule that works best for you.

B. System Design

This round tests the candidate on technical design skills. It can be further split into Low-Level Design (LLD) and High-Level design (HLD). Knowledge in this area grows with industry experience.

Try to gain knowledge on concepts such as — Distributed Systems, Load Balancing, Network Protocols, Consistent Hashing, CAP Theorem, Replication & Sharding, etc.

C. Leadership Principles / Behavioral

Unlike previous rounds, this one is purely non-technical. The company expects to know more about the candidate in his/her own words. Behavioral questions can be related to.

  • Candidate’s Personality
  • Previous projects and work experience
  • Steps taken during challenging situations
  • Response to Positive & Negative Feedback, etc.

“The key here is to remain transparent and just be yourself.”

I will highlight a section mentioned in CTCI on S.A.R. (Situation, Action, Result). The idea is to identify impactful discussion points by classifying stories based on previous work. To know a bit more about this check soft skills sheet.

S.A.R. Model

Tips

  • Participate in coding contests held on LeetCode, Google Kickstart and Codeforces. Keep track of problems you were unable to solve and always do upsolving.
  • I extensively used “Pick One” on LeetCode. Also, avoid solving problems with high dislikes. These are mostly never worth your time.
  • Many interviews take place on non-IDE editors e.g. Google Docs, CollabEdit. So try writing production-quality code on a simple notepad.
  • Make sure you clarify the question and understand it entirely before attempting to solve it.
  • Think out loud during an interview. If you are going in the wrong direction — it helps the interviewer redirect you on the correct path.
  • I often start by jotting down multiple approaches for any interview problem. Beginning with the simplest brute force to the most optimal one and specifying Data Structures & time/space complexities for each. This systematic way of breaking down the problem helps me to explain my thought process.

Q1. Which DSA topics to target? What resources did you refer?
Learning resources mentioned earlier will be useful. I have not added individual resource for each topic since it will elongate this post.
Topics at a high level in no specific order —

Linked-List, Bit-Manipulation, Stacks & Queues, Binary Search, Heaps, Greedy Algorithms, Dynamic Programming, Vectors/ArrayLists, Big O Time and Space, Sorting, Two Pointers, Sliding Window, Union-Find, String Manipulations, Trees and Graphs, BFS/DFS, Recursion, Back-Tracking, Hashing, Trie, Segment Trees & Binary Indexed Trees.

Q2. Which programming languages did you learn?
Learn a single language inside and out; that is enough in my opinion. My preferred choice is Java.

Q3. How do you know what problems are suitable for practice from among 1000s of problems?
It’s virtually impossible to solve every problem. However, there are at max 12–15 DSA topics. Try to strengthen each category by solving topic-specific problems. With practice, one can identify the right data structure and algorithm required. Focus on quality instead of quantity.

Q4. Do I still stand a chance if I am not a Competitive Programmer?
Yes absolutely. Competitive Programming is not mandatory in this context.

  • CP is a sport and has a much broader range of topics and problems. Platforms like CodeChef and Codeforces are more inclined towards CP.
  • There are certainly areas where CP has overlaps and can be helpful. e.g. gain recruiter’s attention to your profile, problem-solving, etc.

However, coding rounds are altogether a different stage and have distinct priorities.

Q5. How to land an interview call? How did you apply?
Recruiter contacted me directly on LinkedIn. I am unaware of the candidate shortlisting process. However, I have a few suggestions.

  • As a student, focus on academics. Participate in contests, Hackathons, work on exciting and innovative projects. Try to make open-source contributions. There are tons of ways to make your profile stand out.

The most important point is to enjoy the journey. Be diligent towards work. Have patience, respect, and always strive to be a better version of yourself. The rest will follow. :)

P.S. I am reachable on LinkedIn profile or email at shantanu.kshire@gmail.com. However, due to personal and professional priorities, I cannot guarantee a response.

--

--