Google interview prep · updated Oct 2026

Google Fresher Interview Questions

Fresher 8 questions

Google makes a search engine, Maps, Gmail, YouTube, the Android phone system and the Chrome browser, all used by people in many languages. A fresher here needs strong basics in data structures and algorithms, and the habit of asking what happens when the input becomes very large. Prepare to think aloud, to test your own ideas with odd inputs, and to explain college projects simply. What to show here: clear thinking aloud about basics at very large size. Each question below has what the interviewer is checking, an answer frame and a sample spoken answer to adapt.

Technical

1. As a person types in a search box, suggestions appear after each letter. Which data structure would you use to find all stored queries that begin with what was typed?

What they are checking
Checks whether you know prefix structures, can compare them with simpler options, and think about ranking the results.
Answer frame
  1. State the need: find by prefix, quickly, after each key press.
  2. Describe a trie and how a lookup walks it.
  3. Compare with a sorted list and binary search.
  4. Explain how to return only the most popular few.
Sample spoken answer

“I would use a trie, a tree where each node is one character and each path from the root spells a prefix. To find suggestions, I walk down the letters typed so far, and everything below that node is a match. The walk takes as many steps as letters typed, no matter how many queries are stored. A sorted list with binary search also works and uses less memory, so I would mention it. Since we only show a few suggestions, I would store the most popular completions at each node, so we do not explore the whole subtree on every key press.”

Red flag to avoid

Weak answers scan every stored query for each letter typed, or forget that only the top few suggestions are needed.

Technical

2. A maps app must find the quickest route between two places. Which algorithm would you start with, and what changes when traffic makes some roads slow?

What they are checking
Checks whether you can model a real problem as a graph, pick a shortest path algorithm and adapt it as conditions change.
Answer frame
  1. Model junctions as nodes and roads as edges with travel time as weight.
  2. Explain Dijkstra's algorithm and why weights must not be negative.
  3. Show how traffic changes weights, not the algorithm.
  4. Mention speeding up search on a very large map.
Sample spoken answer

“I would model the map as a graph: junctions are nodes, roads are edges, and the weight of each edge is the time to travel it. Dijkstra's algorithm finds the quickest path when weights are not negative, using a priority queue to always extend the closest node. Traffic does not change the algorithm, only the weights, so a jammed road gets a larger time. Since traffic changes during a journey, the route should be checked again along the way. On a map of a whole country, plain Dijkstra explores too much, so I would guide the search towards the destination, as the A star method does.”

Red flag to avoid

Weak answers use road distance only and cannot say how traffic would enter the model.

Technical

3. Someone types a misspelled word into a search box. How would you measure how close it is to a correctly spelled word, so you can suggest a fix?

What they are checking
Checks whether you know edit distance and dynamic programming, and can reason about making it practical.
Answer frame
  1. Define edit distance: inserts, deletes and replacements.
  2. Explain the table filled by dynamic programming.
  3. State the time and space cost.
  4. Say how to avoid comparing against every word in the dictionary.
Sample spoken answer

“I would use edit distance, the smallest number of single character inserts, deletes or replacements to turn one word into the other. It is computed with dynamic programming: a table where each cell holds the distance between the first part of one word and the first part of the other, filled row by row from the three neighbouring cells. The cost is the product of the two lengths. Comparing the typed word with every dictionary word is too slow, so I would first narrow the candidates, for example to words of similar length that share several letter pairs. Among close candidates, I would prefer the more common word.”

Red flag to avoid

Weak answers compare letters position by position, which fails as soon as one letter is missing.

Technical

4. An email app groups replies into one conversation. How would you model messages and conversations so a new reply can be attached to the right thread quickly?

What they are checking
Checks whether you can design simple data models and lookups for a familiar feature, and consider messy cases.
Answer frame
  1. Give each message an identifier and a reference to the one it replies to.
  2. Keep a map from message identifier to conversation.
  3. Walk through a new reply arriving.
  4. Handle replies that arrive before the original, and changed subjects.
Sample spoken answer

“Each message would have its own identifier and a field naming the message it replies to. A conversation is a group of messages linked through those fields, like a tree. I would keep a hash map from message identifier to conversation identifier. When a reply arrives, I look up its parent in the map, find the conversation and add the reply in constant time on average. If the parent is unknown, because messages arrived out of order, I create a new conversation and merge the two when the parent shows up. I would not rely on the subject line alone, since unrelated mails can share a subject.”

Red flag to avoid

Weak answers group mails only by subject text, or search all messages to find the parent.

Behavioral

5. Products used around the world receive text in many scripts. Tell me about a time your code failed on an input you had not thought of, and how you changed the way you test.

What they are checking
Checks whether you learn from bugs, and whether you test with unusual inputs rather than only the easy case.
Answer frame
  1. Describe the project and the input that broke it.
  2. Explain how you found the cause.
  3. Show the fix.
  4. Say how your testing habit changed.
Sample spoken answer

“In your project, a search feature for our college library, everything worked in my tests. Then a classmate searched for a book title in Hindi and the app crashed. I had assumed each character was one byte, and my code cut a string in the middle of a character. I fixed it by using proper string functions that understand characters. More important, I changed how I test. I now keep a small file of awkward inputs: empty text, very long text, other scripts, emoji and leading spaces, and I run every text feature against it. After that, your result.”

Red flag to avoid

Weak answers say their code had no bugs, or fix the single case without changing how they test.

Behavioral

6. Tell me about a disagreement in a college team over which approach was faster or better, and how you settled it with a measurement instead of opinion.

What they are checking
Checks whether you can resolve technical disagreement with evidence and keep the team working well.
Answer frame
  1. Describe the two approaches.
  2. Explain how you proposed to measure.
  3. Share what the measurement showed.
  4. Say how the team moved on.
Sample spoken answer

“In your project, a teammate and I disagreed on how to store words for a text search feature. He wanted a sorted array and I wanted a hash table. We argued for an hour without progress. I suggested we each spend one evening building a small version and run both on the same data and the same searches. His approach was slower on exact lookups but much better for prefix search, which our feature needed. I had been wrong about what mattered. We used his design, and I wrote the tests for it. The project your result. Measuring took less time than the argument.”

Red flag to avoid

Weak answers win the argument by insisting, or never find out who was right.

Scenario

7. Your code passes every test, but the reviewer says it will be too slow when the input is every page on the web. What do you do?

What they are checking
Checks how you take review feedback and whether you can analyse and improve the cost of your own code.
Answer frame
  1. Thank the reviewer and ask what size they have in mind.
  2. Work out the time and memory cost of your code.
  3. Find the expensive step and a better structure or algorithm.
  4. Measure on larger input and add a test.
Sample spoken answer

“I would take it as useful feedback, not as criticism. I would ask the reviewer what input size is realistic, then work out the cost of my code. Perhaps I have a loop inside a loop, which is fine for a thousand items and hopeless for billions. I would look for the step that grows fastest and ask whether a hash map, sorting first, or processing in a stream would remove it. I would also check memory, since loading everything at once may not fit. Then I would generate a much larger input, measure before and after, and share the numbers in the review.”

Red flag to avoid

Weak answers argue that the tests pass, or make changes without measuring whether they helped.

Why this company

8. Google's products answer questions and give directions for people in nearly every language. What about that kind of work makes you want to begin your career here?

What they are checking
Checks whether your interest is in the problems themselves, such as search, maps or language, and whether you can link it to what you have done.
Answer frame
  1. Name the kind of problem that interests you.
  2. Link it to a product area such as search or maps.
  3. Give a college example.
  4. Say what you hope to learn.
Sample spoken answer

“What interests me is that the problems look simple from outside and are very deep inside. Finding the right page for three typed words, or a route through a city, is something I use daily without thinking. When I built your project, a small search tool, I found how hard even a tiny version is, from spelling mistakes to ranking. I would like to work where those problems are taken seriously at full size, for users in many languages, including my own. I hope to learn how to write code that stays correct and fast when the input is far larger than anything I have seen.”

Red flag to avoid

Weak answers talk about the brand or the office and cannot name a problem they find interesting.

Salary questions come last

No figures on this page: pay depends on the level, the city and the offer in front of you. When the offer comes, the free salary negotiation script helps with that part.

For the call itself

The questions above are the prep. On the real call, ClapAssist helps with the ones you did not practice.

ClapAssist is an AI interview assistant for Mac and Windows. It listens to the interview on your computer and shows you what to say, in short lines you can read while you talk. Your live interview audio and screen are never stored. Your resume and notes are saved to your account so the app fills them in on any computer. It is hidden from screen share on every plan, including Free; only you can see it.

Download with 10 free minutes
Mac and Windows · Stays out of screen share · No card