Wednesday, April 17, 2024

How To Crack Google Coding Interview

Don't Miss

What Works For You

Prepare for Your Google Interview: Coding
  • Find out what time works best for you. maybe early morning or late at night. before office or after office.
  • You need to give at least 12 hours per day
  • If you are going to college/office, find out what time you have the mental energy to focus. It can be different for different people. I used to study from 14 AM . because distractions are zero at that time. There is no right or wrong time. find out what works for you. The timing which works for you is the best.

Get rid of all distractions, social media, put your phone on silent if you can for 1 hour. Trust me if you are not giving at least 30 minutes of focused time per problem as a beginner, you are not trying hard enough.

These Are Terms Which Might Be Useful For You:

  • Growth rates is denoted by 1< log< n< n*log< n^2< n^3< 2^n< n!
  • Constant 1: indicates fixed algorithm run time regardless of observations.
  • Logarithmic log: indicates repeated halved or doubled runtime
  • Linear n: traverses every item in an array or linked list.
  • Quasi linear n*log: run in linearithmic time
  • Quadratic n²: Iterate and match every pair of element
  • Cubic n³: Iterate and match all triples of items
  • Exponential 2^n: enumerating all subsets of items
  • Factorial n!: generates permutations or orderings of items

How I Cleared Google Interview

The journey has been somewhat unbelievable. If someone would ask me 1 year back why dont you try for Google, I would have said not possible. I am not that good at DS/Algo. I had solved 0 questions on leetcode a year back. I solved 200 Questions until my final interview and got selected. Sharing my experience and some tips here.

I graduated from Engineering College Bikaner in 2015. I got an opportunity to give an interview at Google India in July. And I started brushing up my skills for the first time seriously. I had basic knowledge before this, which was acquired from solving questions and reading up code monk articles on HackerEarth.

Most of my preparation and practice was done on three platforms –

Especially I like the articles on HackerEarth about Heap, Union Find & Dynamic Programming. For any topic, I would start reading the basics of a particular data structure/ Algorithm and read about some of the common problems on that topic. After that, I used to move to leetcode to solve problems.

I had 1 phone interview & 5 on-site interviews . the on-site rounds were split in two days

Resources

2. Cracking the coding interview

3. For Mock Interviews – Pramp/InterviewBit/HackerEarth. Recommend pramp for simulating exact same environment as interview.

Read Also: What To Ask A Cfo In An Interview

What People Are Saying

“I wish I had read this book 90 days ago. I wouldn’t have blown a great job that I really wanted. This book goes beyond the usual answers to questions likely to be asked. Instead of telling you what to think it teaches you HOW to think. If I had read this book first and knew what was coming I think I would have nailed it.”- J. Braun, Amazon.com
“Bought this book 3 weeks before interview. Read the book twice with careful hand-writing practice on each question. Got Amazon offer. The interview had 4 questions and one was in the book.”- Larry, Amazon.com “This book is a must-have for any interview candidate. Not only does it give practice problems and detailed answers, but it also gives you good advice about how to approach the problems as well as what to expect. I used this book to prepare for my interviews with Microsoft, and Gayle’s insight gave me a great idea of how to prepare and how to ace the interview. I recommend this book to anyone who has a coding interview in their future.”- Michelle, Amazon.com

The Google Software Engineering Hiring Process

Most Popular Coding Languages for FAANG Interviews in 2021

It’s worth bearing in mind that your coding interview is only half the battle. One that definitely requires adequate preparation and planning, but making sure youâre ready to conquer the remaining steps is equally important.

Familiarize yourself with the entire process. Be certain that you know what to expect and are fully prepared.

Step 1: Get noticed
  • Via a Recruiter on LInkedIn. 95% of recruiters use LinkedIn to discover talent for the vacancies theyâre looking to fill. Make sure your profile is optimized for landing Top Tech jobs.
  • Referrals. If you know someone who works at the company youâre targeting they can refer you for the role.
  • Website. You can apply directly through the company website. Itâs important to note though that your chances increase 8-1 if you apply via referral or are working through a recruiter instead.
Step 2: Phone Screen
  • 1-3 telephonic coding interviews. You can expect to be asked the kind of questions we cover in this article in your phone screens. They typically last about 40 minutes.
Step 3: Onsite Interviews
Step 4: Offer

Hiring committee reviews your offer and decides on the annual salary, relocation bonus and stocks offered to you. At this point you might want to enlist the help of an offer negotiation specialist to ensure you secure the best possible offer.

Recommended Reading: What Are Questions To Ask The Interviewer

Phases Of A Coding Interview

Congratulations, you are ready to put your skills to practice! In a coding interview, you will be given a technical question by the interviewer. You will write the code in a real-time, collaborative editor or on a whiteboard , and have 30 to 45 minutes to solve the problem. This is where the real fun begins!

Your interviewer will be looking to see that you meet the requirements of the role. It is up to you to show them that you have the skills. Initially, it may feel weird to talk while you code, as most programmers do not make a habit of explaining out loud their thoughts while they are typing code.

However, it is hard for the interviewer to know what you are thinking by just looking at your code. If you communicate your approach to the interviewer even before you start to code, you can validate your approach with them. This way, the two of you can agree on an acceptable approach.

What Is Unique About Google Interviews

Though software engineer interviews at Google are similar to other big tech companies, there are some unique aspects of their process. So, unlike Apple, Microsoft, or Amazon, whats different?

Clear expectations:Google is not shy about their interview process, so there is little guesswork when it comes to preparation or expectations. Google provides all the details of what to expect on their careers page.

Coding in Google Docs:During the initial phone screen, you will be expected to code in Google Docs. Its important to study how to code well on this platform, as it can take some practice.

Hiring committee:Google aims to review applicants without bias, so they utilize a hiring committee for all candidates.

Grading scale: Each interviewer is graded on a scale of 1-4 based on the four hiring criteria where 3 is the threshold for hire vs. no hire.

Four hiring criteria: Google focuses on cognitive ability, Googleyness, leadership skills, and technical skills in their candidate review process. Lets break that down in the next section.

Read Also: What Are Some Questions To Ask In An Interview

Picking A Programming Language

Before anything else, you need to pick a programming language for your algorithmic coding interview. Most companies will allow you to code in the language of your choice. The only exception I know is Google. They allow their candidates to pick from only Java, C++, Python, Go or JavaScript. For the most part, I recommend using a language that you are extremely familiar with, rather than one that is new to you but that the company uses widely.

There are some languages that are more suitable than others for coding interviews. Then there are some that you absolutely want to avoid. From my experience as an interviewer, most candidates pick Python or Java. Other languages commonly selected include JavaScript, Ruby, and C++. I would absolutely avoid lower-level languages like C or Go, simply because they lack standard library functions and data structures.

Personally, Python is my de facto choice for coding algorithms during interviews. It is succinct and has a huge library of functions and data structures. One of the top reasons I recommend Python is that it uses consistent APIs that operate on different data structures, such as len, for ⦠in ⦠and slicing notation on sequences . Getting the last element in a sequence is arr , and reversing it is simply arr. You can achieve a lot with minimal syntax in Python.

Allocating Time To Learn Basic Vs Advanced Algorithms

Google Coding Interview With A Normal Software Engineer

Most technical interviews run around 3045 minutes, which means that the likelihood for you to explain advanced concepts such as Red-Black or AVL trees is very low.

This means you should allocate more time to brush up basic concepts until you understand them clearly. You can focus practicing Easy to Medium then maybe a few of Hard Leetcode problems.

Don’t Miss: Aws Cloud Infrastructure Architect Interview Questions

Tips For Practicing Coding Challenges

There is no shortcut or magic wand for practicing coding challenges. Here are some basic tips to guide you through the preparation stage.

Keep time in mind. The coding interview will be timed, so its important to prepare with that in mind. If you are used to preparing under a time constraint, it will be far less stressful during the actual interview.

Know your weak spots. As you prepare, take note of your weak spots. Everyone has them. Google has stated that they care about your thought process, so if you come up against a weak spot, talk through it. This will demonstrate your eagerness to improve.

Know the common pitfalls. There are three big pitfalls when it comes to a Google interview: not knowing the Big-O complexity of an algorithm, having no knowledge of Googles expectations, and not articulating your problem-solving process. Keep these pitfalls in mind as you work.

Articulate your process. Google wants to hear about your thought process. As you practice, get used to explaining why and what you are doing. Those with a clear sense of how they work stand out.

Behavioral interviews are often overlooked by software development candidates. In reality, this is the interview that sometimes will make or break you as a candidate. Google cares deeply about their values, so if you come unprepared for these questions, theyll notice it.

Coding Interview Time Management

A framework for answering coding questions â how to approach a coding interview.
  • First 5 minutes – Ask clarifying questions and come up with examples â give the inputs and outputs you would use later for testing. Your aim here is to make sure you and the interviewer are on the same page.
  • Next 10 minutes Suggest the solution. Start with suggesting the obvious solution and work to improve from there. Even if you think of an optimal solution at first, you ideally donât want to start there as youâll have no room for demonstrating improvement. A good candidate will present numerous design alternatives, each with pros and cons on tradeoffs between time, space and code complexity.If you can only think of a brute force solution, Avaâs advice is to just move ahead and start coding. While youâre coding you might get some better ideas, or your interviewer might give you some hints. You can also ask your interviewer for hints if youâre really stuck. Ava says itâs totally allowed, and you wonât fail your interview for asking for a hint.
  • Next 20 minutes – Write good code, say what youâre doing. Your aim is to write readable, production ready, structured code that would work and another software engineer could understand. You want to start coding by the 15-minute mark. Typically, people who leave it later than this point to start writing their code donât finish in time and donât have time to test their code.
  • Also Check: Aws Cloud Engineer Interview Questions And Answers

    Common Google Coding Interview Questions

    Google is a behemoth in the technology world, significantly impacting the everyday lives of over 3 billion internet users across the globe. It also regularly makes the list of most valuable brands in the world and the best companies to work for, mainly due to its excellent work culture and environment. Every software engineer who wishes to scale the heights of their career dreams of landing a job at Google. However, getting into Google isnt easy. Known to hire only the worlds top talent, Google accepts less than 1% of applicants for software engineering positions. Getting hired by Google takes a great deal of effort, typically involving several hours of practice and preparation, powered by the right strategy. This article will cover:The Google interview processWhat is expected of candidates during a coding interview at Google? Topics to prepare for Google coding interviewCommon Google coding interview questions How to prepare for Google coding interviewsTips for practicing coding challenges Tips for acing coding questions during the interviewFAQs on Google coding interviewsHow can Interview Kickstart help you land a job at Google?

    Video advice: Google Coding Interview With A High School Student

    Video advice: Cracking the Google Coding Interview Complete Story Told By Software Engineer

    Cracking The Google Interview Process: Achieving The Unattainable

    ASCI, COEP

    Making it through Googles interview process can be difficult. Coders and designers of all skill levels face a daunting and intimidating task when attempting to complete a project. The technical interview alone lasts 45 minutes and only 20% of applicants pass it. Those who do make it through are some of the industrys top minds, as well as those who have mastered the skills required to answer the Google-specific questions that arise. The hiring process at Google is difficult, but it is not impossible. Anyone with the necessary preparation and skills has a chance of being hired by Google, and it is a prestigious 2% of job seekers each year. The Google interview process may appear daunting at times, but with the right approach, it can be a rewarding and intellectually stimulating experience.

    Read Also: How To Successfully Interview Someone

    List Of Practice Questions

    Now that youve got a framework in mind, use it to practice some real interview questions that were asked in past interviews at big tech companies. Here is a list of prioritization questions from PM interviews at , , , and Lyft, according to data from Glassdoor.com and Blind.

    Example prioritization interview questions

    • Imagine youre a PM at a startup that works with big data from the NHL whats the first product you would ship?
    • How do you build a roadmap?
    • How do you prioritize what to build?
    • If you have projects A, B, C, how do you prioritize them?
    • How do you prioritize in your current role?
    • You are the PM for Facebook live what features would you prioritize?
    • You are the PM for Facebook pages what features would you prioritize?
    • You are the PM for Facebook posts what reactions should we add next?

    How Is The Google Interview Different From Other Companies

    Google isnt shy about sharing their hiring practices. In fact they have a whole page dedicated to exactly that.

    The interview process begins with at least one phone screen and, if successful, a series of onsite interviews. The Google phone screen and onsite portions are fairly typical across the board of technical interviewing, but the process at Google is unique in a couple specific details:

    Read Also: How To Interview A Realtor When Buying

    Don’t Miss: How To Properly Answer Interview Questions

    The Most Common Interview Mistakes

    Ava says there are some coding interview mistakes that are frequently made yet easily avoidable.

    #1 Not knowing what to expect.

    Turning up for your interview not knowing what kind of questions youâll be asked is one of the most frequent mistakes Ava sees.

    Itâs important that youâre familiar with the interview structure as well as the types of questions the interviewers will pose and that youâve practiced these kinds of questions.

    #2 Not taking enough time to prepare

    Ava says she gets many requests for mock interviews where the person has only a week before their coding interview and has done no prior prep. Unfortunately the honest answer here is that you canât prepare adequately in this time frame if youâre only looking to start now.

    #3 Not using the interview time efficiently

    In the interview, time management is crucial to get through everything you need to cover. You have 40 minutes to solve an unfamiliar question, explain what youâre doing to your interviewer, write working code, test it, clarify time and space complexity and ideally go beyond the task by suggesting alternatives.

    The only way to get better at getting through these tasks within the constraints of the interview structure is to practice using that structure through mock interviews.

    There are several ways you can do this:

  • 1-1 coaching from a coach with personal experience with the FAANG interview structure like Ava.
  • Using free online platforms.
  • #4 Solving the wrong problem

    Google Interview Questions With Answers

    Medium Google Coding Interview With Ben Awad

    Google is one of the most sought-after employers, so its no surprise that interview questions can be difficult and complicated. The key to acing an interview with Google is to be prepared and know what to expect. Common Google interview questions and answers may include topics such as problem-solving, coding, data structures, software engineering, machine learning, and more. Its important to practice talking through your answers and provide concrete examples to demonstrate your skills. Be sure to also showcase your creativity and critical thinking to show you have the skills Google is looking for. With the right preparation, you can be confident and ready to ace your Google interview.

    You May Like: Java Interview Coding Questions For 10 Years Experience

    More articles

    Popular Articles