Google Interview Questions

Try some questions now

We've helped several engineers get the job at Google

Practice Questions for the Google Interview

Google is known for having one of the hardest technical interviews. So it's not surprising that the coding interview questions we hear about being asked at Google are some of our hardest. Get ready to nail your SWE, SRE or SET interview!

The Two Egg Problem »

A building has 100 floors. One of the floors is the highest floor an egg can be dropped from without breaking. If an egg is dropped from above that floor... keep reading »

Second Largest Item in BST »

Write a function to find the 2nd largest element in a binary search tree. Our first thought might be to do an in-order traversal of the BST, but this would take time and... keep reading »

The Cake Thief »

You are a renowned thief who has recently switched from stealing precious metals to stealing cakes because of the insane profit margins. You want to make off with the most valuable haul possible, and you... keep reading »

Find Duplicate, Space Edition »

Find the duplicate in an array of numbers. But here's the tricky part: this time, we're optimizing for space. Hash maps won't save you here. We could try to "brute force" it, but... keep reading »

Find Duplicate, Space Edition BEAST MODE »

Same problem as the above, but the optimal answer is so complicated we had to spin it off into its own challenge. Try the normal version of the problem first and if you think you're ready, move on to BEAST MODE... keep reading »

Reverse a Linked List »

Don't create new node objects—reverse the list in place. This one's a classic, yet it's remarkable how many people struggle with finding the most efficient... keep reading »

Getting Rich on Apple Stocks »

Writing interview questions hasn't made me rich, so I turned to the stock market. Given the price of Apple stocks every minute yesterday, figure out how much I could have made from one purchase and one sale of one share... keep reading »

Word Cloud Data Generator »

You want to build a word cloud—an infographic where the size of a word corresponds to how often it appears in the body of text. Write code that takes a long string and builds... keep reading »

Simulate a 7-Sided Die Using a 5-Sided Die »

You have a function rand5() that generates a random integer from 1 to 5. Use it to write a function rand7() that generates a random integer from 1 to 7. rand5() returns each integer with equal probability... keep reading »

Find Duplicate Files After Malicious Attack »

You left your computer unlocked and your friend decided to troll you by copying a lot of your files to random spots all over your file system. Write a function that returns a list of all the duplicate files. We'll check... keep reading »

What Characterizes A Google Interview Question?

What makes a Google interview question different from one that might be asked at Facebook, Amazon, Microsoft, Twitter, etc?

Nothing. Nothing at all.

The truth is, the specific question you get asked has far more to do with the interviewer assigned to you than it does the company you're interviewing at.

There's no way to know ahead of time what questions your interviewers will ask you. Your interviewers' employer probably doesn't even know what questions your interviewers will ask you. There are literally thousands of possibilities for what your interviewer could ask you. So the strategy for winning at these interviews is not to "learn" a bunch of Google interview questions and then hope that your interviewers ask you the questions you've already learned.

Instead, the strategy is to get really good at answering questions you've never seen before. That means this is a game of quality over quantity. As you go through each question, think of yourself as developing your algorithmic thinking, rather than simply "learning a new problem." Notice the insights and patterns used to derive and optimize a solution, and think about how you can apply those to new problems you've never seen before.

Our practice questions are uniquely focused on this approach to coding interview preparation. When you're not sure how to proceed with a problem, we'll give you a hint that gives you just enough to pick back up and keep working on the problem yourself. If you have an answer but it's not the optimal answer, we interrupt you with a "gotcha" that directs you to keep thinking about the problem, instead of just blowing the exercise by showing you the answer. In this way, we train you in the kind of thinking required to break down problems you've never seen before.

Google's London office

Google's London office, designed by architecture firm Scott Brownrigg. The "O"s are doorways!

"Your best bet, interview-prep wise, is to practice the art of recognizing that certain problem classes are best solved with certain algorithms and data structures."

Steve Yegge, "Get that job at Google"

"Because these are difficult questions, the first answer or approach that pops into your head is almost always wrong."

Dan Schawbel, author of "Are you Smart Enough to Work at Google?"

 

"Be prepared to talk about everything at Google...from self-driving cars to Google Maps to Google Wave...as much as possible, be informed."

Douglas Edwards, employee #59 at Google

Try some questions now

"It's okay to get stuck, and it's okay to just say that you're stuck. Just talk about what you're thinking and why you're stuck."

— Eddie, engineer on the Google Platforms team.

Google Interview FAQ

Should I say which project I'd like to work on? What if I choose one that's more selective?

Don't worry about it. If they like you but you aren't a fit for the team you want, they'll offer you something else. It can be nice to show your research by having a few teams you're especially excited about, especially if you can connect them to past experience.

How is a Site Reliability Engineer (SRE) interview different from a Software Engineer (SWE) interview?

The SRE interview includes an added "troubleshooting" component. It's like a case study where you tell the interviewer what commands you would run and she tells you what the outputs would be as you try to diagnose a system failure.

Try some questions now

Psst. Pass it on.

. . .