Preparing for interviews at Google can be daunting, even for experienced programmers who boast several years of coding and programming experience.
Cracking the Google interview is often the direct result of dedicated preparation covering a wide range of topics, including behavioral aspects. It involves mastering programming fundamentals and identifying inherent patterns in problems.
The Google interview process comprises three main rounds of interviews -
- The Technical Phone Screen Interview
- The On-site Interview (comprising 3-5 rounds of coding and other technical skill assessments)
- The Behavioral Interview .
You’re given an offer based on your performance as assessed in each individual round of the interview process.
The technical phone screen interview is essentially a screening round to filter candidates based on their proficiency in a programming language, and their ability to solve simple coding problems by employing programming fundamentals.
In its on-site technical rounds, Google tests extensively for problem solving skills. Questions asked centre around a candidate’s proficiency in core technical areas such as data structures, coding, algorithms and systems design.
If your Google interview is just around the corner, this article will help you prepare for success.
Here are 100+ questions that commonly feature at Google’s interviews. You can’t expect to be asked these questions verbatim - the idea is to decipher inherent patterns in these problems to be able to solve new problems that employ very similar approaches and logic. To successfully crack a coding interview at any Tier-1 company, developing your problem-solving skills by practicing numerous coding problems is imperative.
Google Technical Interview Questions
Google’s technical interview is one of the most challenging technical interviews conducted by FAANG companies, requiring candidates to prepare on a wide range of topics.
The key areas from which candidates can expect questions are -
- Data Structures
- Systems Design
Let’s look at technical interview questions in each of these categories to help you prepare for your upcoming Google interview.
Google Interview Questions on Data Structures and Algorithms
Data structures and algorithms are key concepts often featured in FAANG technical interviews.
Before delving into the questions, here’s a list of concepts that commonly feature in Google’s technical interview rounds -
- Linked Lists
- Graph Algorithms
- Dynamic Programming
- Divide and Conquer
- Recursion and Hashing
- Stacks and Queues
There’s no particular preference or weightage for any of these sections. Many problems will involve applying multiple concepts in conjunction with each other to arrive at a solution.
As an aspiring Googler, here are some common questions you can expect at the interview.
- For a given unsorted array “X”, consisting of non-negative integers, write a code to find the contiguous subarray that adds to the sum “S” of non-negative integers in the array.
- For a given array “X”, consisting of non-negative integer characters, write a code to find the contiguous subarray with the maximum sum.
- For a given array “X” of size N-1 consisting of numbers from 1 to N with one number missing, write a code to find the missing number in the array.
- For a given set of 2 sorted arrays “X” and “Y” with respective sizes “n” and ‘m’, write a code to merge the two sorted arrays such that their characters appear in decreasing order.
- For a given set of 2 arrays “X” and “Y” consisting of positive integers, write a code to find the total no. of pairs to satisfy the condition x^y>y^x, where “x” is an element of array “X” and “y” is an element of array “Y”.
- For a given array “K” where all the elements in the array are distinct, write a function to find the Kth smallest element where “K” is a number and is smaller than the array’s size.
- You’re given an array “X” of size “N”, containing sets of 0s, 1s and 2s. Write a program to sort the array elements in ascending order.
- For a given array “X” of N positive integers, write a function to return the value “True” if a particular triplet (a,b,c) accurately satisfies the condition: a^2+b^2=c^2 - this is commonly called the Pythagorean Triplet problem.
- If you’re given an array “X” comprising “n” positive integers, write a function to compute the inversion count of the array.
- You’re given two Linked Lists “A” and “B” that are sorted. Write a code to merge the two Linked Lists.
- Explain Longest Common Sequence and Longest Increasing Subsequence in Dynamic Programming.
- For a given Singly Linked List “K” write a code to select a particular “random” node from the list.
- Explain the process to implement BFS and DFS in a given graph.
- Explain how to implement the functions - “strstr” and “Atoi” by citing examples.
- Write a code to find the middle element in a given Linked List ‘K”.
- Write program functions to implement Loop Detection and Loop Removal in a given Linked List “K”.
- For a given string “K”, write a function to eliminate duplicates from the string.
- Write a program to find out if two given strings “A” and “B” of set sizes, are anagrams of each other.
- For a given binary tree “BT”, convert it into a Doubly Linked List (DLL), using the left and right pointers in the nodes as the previous and subsequent pointers in the DLL.
- For a given Binary Search Tree with unique values and two node values, write a code to find the Lowest Common Ancestor of the two given nodes in the Binary Search Tree.
- For a given Binary Tree, write a function to print the bottom view of the tree from left to right.
- For a given Binary Tree (BT), write a code to print the vertical traversal from the leftmost to right most levels.
- Explain a few Greedy Algorithms and their applications.
- Write a code to find the longest path in a given matrix m*n, where all the values in the matrix are unique. The path should be such that the cells should appear in ascending order.
- For a given string “S”, write a function to compute the length of the longest substring that has only distinct characters.
Google Interview Questions on Systems Design
Systems design is another important area you should focus on. If you’re interviewing for senior positions, expect more questions on systems design.
Here are some commonly asked systems design questions asked at the Google interview.
- Explain the process involved in:
- Designing a platform like Instagram
- Designing a chatbot
- Designing a search engine that’s able to capture unique results
- Designing a full fledged API rate limiter
- Designing a web crawler that identifies uniqueness in pages and ranks them accordingly.
- Designing a platform like Uber that relies and operates on location data
- Designing a Typeahead Suggestion feature
- Designing Pastebin and Dropbox
Google Behavioral Interview Questions
Behavioral interviews test various psychological traits in candidates and seek to identify how they’d react in similar workplace-related situations. Regardless of the role or position you apply to, you’ll have to go through a mandatory behavioral round that significantly influences the outcome of your interview.
Behavioral interviews are usually given more importance while recruiting for leadership or managerial positions e.g. Engineering Manager, Director of Engineering, Technical Project Leads, or other higher-ranking positions. These positions require candidates to possess sound leadership and project management skills.
Below are some common behavioral questions candidates are asked in the Google interviews.
- Questions on teamwork and collaboration
Collaborating with team members is an important attribute to execute successful projects. Hiring managers at Google ask questions related to teamwork and collaboration to see if you’ll be a good fit with your prospective team. Google also has a team-matching exercise based on which candidates are matched to teams according to their areas of interest, hobbies, and skills.
Here are some questions on teamwork and collaboration with coworkers.
- Describe a time you faced conflict while working as a team and how you dealt with it.
- Tell us how you’ll create an impact on your team after you join.
- How important are team-building exercises according to you?
- How do you build relationships with an uncooperative person at your workplace?
- Tell us how you found common ground with a colleague with differing ideas for a common project.
- Tell us how you dealt with an uncooperative co-worker and so as to avoid negatively impacting a project.
- Tell us how you approached failure while working as a team.
- Have you worked with a colleague who was lagging ? How did you approach the situation to prevent it from impacting an ongoing project?
- Questions based on work-life balance and handling work-related stress
Work-life balance is a crucial element significantly impacting an individual’s productivity. By striking work-life balance, employees display higher productivity.
- What is the best way to maintain work-life balance?
- Describe a time you were stressed about a project’s outcome and how you coped to achieve the desired result.
- How often do you think employees need vacations? Do vacations help restore harmony to a person’s work-life?
- Do you indulge in outdoor activities? If yes, how do you think it helps with your work?
- How do you handle stress and pressure at work, especially in the midst of tight deadlines?
- How important is mental health according to you? What activities do you do to actively tend to your mental health?
- Questions on client management skills
Client-facing and management skills are an important trait. Understanding client needs and adopting a suitable approach are necessary for the successful execution of a project.
Here are some common questions asked in Google behavioral interviews to assess client-facing skills.
- Tell us about a time you worked with a difficult client and how you navigated challenges to execute the project.
- Tell us how you convinced a client to chart a different course for a project.
- Describe a time you were asked to work on a client project that you were unsure about how to proceed.
To answer these questions, think about a time you executed a difficult project which required learning and applying new skill-sets.
- Questions on relationships with managers and superiors
Having cordial relationships with your superiors greatly influences your learning curve and future career prospects.
Some questions used to assess your relationships with your superiors -
- Tell us about a time you had to convince your manager to change the course of a project.
- Tell us about a time you took a risk on a project and failed? How did it affect your relationship with your manager.
- Tell us how you dealt with a very difficult manager.
- Describe a time your superior was unreasonable and how you engaged in dialogue with him/her to resolve the issue.
- What, according to you, is the best way to maintain a cordial relationship with your immediate superior.
- Tell us about a time your contribution was overlooked and somebody else took credit for it. How did you approach this?
- According to you, is it important to maintain a good personal relationship with your immediate manager? Why or why not?
To answer these questions, think about how you were able to learn because of cordial work relationships with your superiors, and how you were able to implement these learnings during the course of your employment under them.
- Questions on adaptability
Hiring managers at Google often ask candidates questions on adaptability to see if they can quickly tune-in to demands of new projects.
- Describe a time your team underwent significant structural change and how it impacted you and your coworkers.
- Tell us about a time when you were asked to take on a completely new project that involved acquiring a new set of skills.
- How do you prioritize tasks in a project? Explain the process.
- Describe a time you worked on a short but demanding project, and how you prioritized tasks.
- Tell us about a time you acquired a new set of skills to successfully execute a short-term project.
- Describe a time you took the lead on a project and how you imparted your learnings to fellow colleagues.
To answer questions on adaptability, think about a time you were exposed to a completely new project or a new team exercise and how you successfully executed it.
- Questions on Google’s products and the company
- What is your favorite Google product and why?
- Why do you want to work at Google?
- What is the one thing about Google’s culture you like the most?
- What challenges do you foresee for android in the future?
- Which Google product in the making will revolutionize how users interact with the world?
- Questions on past projects
Recruiters at Google want to know about challenging projects you’ve taken on and successfully executed in previous organization(s).
- Describe your most challenging project and how you executed it.
- Describe a time you were part of a difficult, long-term project which required new learnings and how you and your team applied them.
- Describe a time when you took a risk in a project and failed. How did you learn from your failure?
- How do you complete multiple projects under tight time constraints?
To answer questions based on this, prepare details of a successful project you worked on in the past that was particularly complex in nature.
Java Interview Questions asked at the Google Interview
Java is a popular programming language, often deemed an evergreen language owing to its extensive applications.
Here are the most common Java interview questions asked in Google Interviews.
While you may not be asked questions about Java and its core features, specifically, ( depending on the role you’re interviewing for), you may be asked to write code and solve problems using the fundamentals of Java programming.
- Explain why Java as a programming language is not completely object oriented.
- Explain constructors and wrapper classes in Java. Illustrate how they’re employed with valid examples.
- Explain the fundamental differences between Stack Memory and Heap Memory in Java.
- Explain the concept of polymorphism in Java. How is it used in modern day problem-solving?
- Explain Dynamic Polymorphism and Runtime Polymorphism with relevant examples. Write program functions to execute each of these properties.
- Explain Method Overriding and Method Overloading in Java by providing examples.
- Explain the techniques of Encapsulation, Aggregation and Association in Java.
- Explain how cookies work in Servlets.
- What are the various JDBC API components in Java.Sql?
- Write a program code to determine if a given string is a palindrome or not.
- Write a program to identify all the prime numbers from a given set of numbers in a given string.
Python Interview Questions asked at Google Interviews
Python is a widely used programming language that has gained preference over other existing languages owing to its easy and straightforward syntax.
Here are the most commonly asked python interview questions for developer roles at Google.
- Explain what are Modules and Paths in Python.
- Explain how to design a Message or Chatbot using Python.
- Write a program code in Python to execute the Merge Sort Algorithm.
- Explain the process to create an Empty Class in Python.
- How do you achieve Data Abstraction in Python?
- Write a program to create a Fibonacci series using Python.
- Write a code to find n number of prime numbers from a given set of numbers using Python.
- Explain the fundamental differences between a Flask, Pyramid and Django in Python. What are they used for?
- Explain the process to set up a full fledged database in the Django framework.
- Explain the Map Function feature in Python.
- Explain the differences between SciPy and NumPy in Python.
- Write a program to arrange the numbers from 1 to 100 in a perfect triangle using Python.
Domain-specific Google Interview Questions
Google frequently hires candidates for a long list of tech roles, and questions on domain expertise are often reserved for the end rounds of the interview. To help you prepare for domain-specific interviews at Google, here are a bunch of technical questions that are asked for specific roles as mentioned below.
Google Software Developer Interview Questions
- Write a code to find the quickest way to find the largest element in a given circularly sorted array.
- Explain the process to implement 3 or more stacks in a given array.
- Write a program code to solve the Rubik’s cube - you can use a programming language of your choice.
- Write a program code to implement a hashtable in the programming language of your choice.
- Write a code to find the number of times an element occurs in a sorted array.
- Write a code that shows if any binary tree from a set of trees is a mirror image of itself.
- Write a program function to find the second-largest and largest elements in a given binary search tree.
- In a given sorted array, write a function to find if an element has been duplicated or not.
- Write a code to reverse a given linked list.
- Write a program code to print a set of duplicate characters from a given set of characters in a string.
AI and Machine Learning Interview Questions asked at the Google Interview
- Explain the process on how to design and build a recommendation system.
- Explain the Rectified Linear Unit in AI and Machine Learning.
- Explain the AdaGrad algorithm in Machine Learning.
- Explain the methods to detect anomalies in AI.
- Explain AUC and evaluation metrics in AI and Machine Learning.
- Explain what is caching and how it is employed in Data Science.
- Explain the applications of Feature Selection in AI.
Google Front-end Developer Interview Questions
- Explain the features of the commonly used web application - Node.js.
- What is the “Strict” mode and why is it used?
- Explain the processes of encapsulation and Callback Hell. What are their applications?
- Explain what is Cross Site Scripting and how to deal with a malicious attack.
- In a given <Script> tag, explain the ‘async’ and ‘defer’ attributes.
- Explain the “type” attribute in HTML. How do you add the attribute to “script” and “link” tags in HTML?
- Explain the technique of “load balancing” and common “load balancing” techniques used in web application building.
- Explain the functions of various tools used to test Web APIs.
Google Backend Developer Interview Questions
- Write a code to find if a given binary tree has an odd number of nodes without applying the node count feature.
- Write a program code to sort a given string without employing Java API.
- Write a program function to fetch data from a given database and transfer it to a new database.
- Explain the process to design a comprehensive Google Sheet system.
- Write a code to count the maximum number of pairs in an array to satisfy the condition - a<= 2b.
- What are NoSql databases and what are their applications?
- Explain the fundamental differences between Linear Search and Binary Search.
- How would you control Injection Risks in SQL.
- Explain the workings of a “Facade Pattern”.
- Explain the differences between Clustered and Non-Clustered Indexes.
Google Engineering Manager Interview Questions
Engineering managers supervise technical leads and senior engineers to create and structure project designs. They’re usually directly involved with Quality Assurance, Project maintenance and Operations. For EM positions and above, there is heightened focus on systems design questions (that involve conceptualizing architecture for technology products) and behavioral questions. As EMs typically handle large teams of engineers, recruiters tend to focus more on questions pertaining to team management, task prioritization and executing long-term projects that involve considerable complexities.
Questions asked at EM interviews are fairly similar to those asked at IC interviews. They differ minutely though - Click here to learn the differences between Engineering Manager and Individual Contributor roles.
- Check out our comprehensive interview guides for Netflix and Microsoft
- These 9 reasons will tell you why technical interviews need dedicated preparation.
- Here’s why you were unable to crack a recent technical interview.
Want to get started with your technical prep? Sign up for our free webinar today.