InterviewLegend

Google Coding Interview: What Gets Asked

Alex Chen9 min readUpdated 557 real interview reports
In this lesson
  • Know how Google's coding rounds are run and what the interviewer actually scores
  • See which problem patterns show up most, and the order to drill them in
  • Work this section pattern by pattern, with runnable problems and worked solutions

Google's coding interview is built from a small set of data-structures-and-algorithms patterns: graphs and grids lead, followed by arrays and hashing, two pointers and sliding windows, trees, dynamic programming, and heaps. Questions run at LeetCode medium-to-hard, take place in a plain Google Doc with no IDE, and are scored as much on how you reason as on whether you reach the answer. The most reliable prep is to drill the recurring patterns, not to grind a random problem list.

Three of your four onsite rounds at L3 and L4 are pure coding. At L5 it's three of five. So more than half of what stands between you and an offer is one thing: a blank editor and a problem you've never seen. Here's the part the reputation gets wrong. Google is predictable. The same handful of patterns come around again and again, and you can drill every one of them before you walk in.

How a coding round runs

Each round is 45 minutes in a shared Google Doc. No IDE, no autocomplete, and expect no way to run your code, though some candidates now get a basic editor with syntax highlighting. You check correctness in your head and on paper as you go. A rough split holds up: five to ten minutes understanding the problem and pinning down examples, then twenty-five to thirty-five writing and talking through the code. Leave the last few minutes to trace your solution on a concrete input. That trace is where strong candidates lose points, by skipping it.

One recent change matters. In May 2026 Google started piloting an AI-assisted format for some junior and mid-level roles. Instead of writing an algorithm cold, you read and debug an existing codebase with Gemini on hand. The pilot is narrow. Most candidates still get the classic format, but ask your recruiter which version your loop uses.

What the bar really is

The right answer matters, but it's a small slice of what interviewers score. They're watching the path you take to get there. Do you pin down the input and edge cases before writing anything? Does the code read cleanly without a running commentary? And when a follow-up lands, do you adapt instead of freezing? Two candidates can reach the same solution and walk away with opposite verdicts. The code is only ever part of what's graded.

The patterns that matter

Google won't hand you a question list. But the mix isn't a mystery to anyone who has sat the loop, and it's lopsided. A small set of patterns covers most of what gets asked. That settles the order you study them in.

Graphs & Grids18%
Arrays, Hashing & Stacks14%
Two Pointers & Sliding Window12%
Intervals10%
Dynamic Programming10%
Trees9%
Binary Search8%
Backtracking7%
Heaps & Top-K6%
Design4%
Strings2%
How often each pattern comes up in Google coding rounds (2023–2025). Google doesn't publish these numbers; the ordering is how often each one shows up. Spend your first prep hours at the top.

Graphs and grids come out on top, with the array-and-hashing fundamentals and the two-pointer family close behind, and the rest spread out behind them. These are the pattern families we teach, and this section walks them in roughly that order. Each lesson opens with a short read on how Google frames the pattern and the variants they favor. Then it hands you one to four of the most-asked problems as runnable exercises with worked solutions. The full algorithm walkthrough for each lives in the Foundations course, linked from every lesson, so these pages can stay on what's specific to Google.

Arrays, Strings & Hashing

The hash-map and monotonic-stack fundamentals behind Two Sum, Longest Consecutive Sequence, and Maximal Rectangle, plus the careful string work in Text Justification.

Two Pointers & Sliding Window

Opposing pointers and the sliding window, behind a Premium question, a Premium question, a Premium question, and a Premium question.

Binary Search on the Answer

Searching a range of candidate answers with a yes-or-no feasibility check, behind two Premium questions in D days, and a Premium question.

Graphs & Grids

Flood fill, multi-source BFS, and topological sort, plus Google's binary-tree spin on a Premium question.

Backtracking

The choose / recurse / un-choose skeleton behind Subsets, Permutations, two Premium questions.

Trees

a Premium question, BST validation, and serialize/deserialize, heavy on follow-ups.

Heaps, Intervals & Scheduling

Size-k heaps and k-way merge (Top K Frequent, Merge k Lists), plus the interval-merging and min-heap trick behind a Premium question.

Dynamic Programming

Three Premium questions via the state-and-transition recipe.

Design & Data Structures

An LRU (least-recently-used) cache and constant-time random-access structures, pairing a hash map with one more piece.

Strings & Simulation

Text Justification and word-spacing, where careful bookkeeping beats cleverness.

Common questions

What coding questions does Google ask?

Mostly medium-to-hard data-structures-and-algorithms problems. Graphs and grids come up most, then arrays and hashing, two pointers and sliding windows, trees, dynamic programming, and heaps. Google favors a problem with one clean core idea and a strong follow-up over a long, fiddly implementation.

What is the most famous Google interview question?

Historically, Google was known for brain-teasers like "how many golf balls fit in a school bus." It dropped them years ago: Laszlo Bock, Google's former head of people operations, called them "a complete waste of time." The interview today is standard algorithmic coding, so prepare patterns, not puzzles.

Is LeetCode enough to prepare for Google?

It is necessary but not sufficient. Every pattern Google reuses lives on LeetCode, but the round also scores your clarifying questions, how cleanly you communicate, and how you handle a follow-up, none of which a solved-problem count captures. Drill patterns, then practice narrating them out loud in a plain editor.

How many coding rounds does Google have?

Three of four onsite rounds at L3 and L4, and three of five at L5, plus the technical phone screen. That works out to about four coding interviews in a typical loop, which is why coding prep carries the most weight.

Key Takeaways

  • ✓Coding is more than half your onsite: 3 of 4 rounds at L3/L4, 3 of 5 at L5. The patterns repeat, so preparation pays.
  • ✓You write in a plain Google Doc with no IDE and no way to run code, so practice tracing solutions by hand and always test before you say you're done.
  • ✓A correct answer is just the starting point. Clarifying questions, clean code, self-caught bugs, and handling follow-ups are what move you from pass to strong.
  • ✓Graphs and grids, the array-and-hashing fundamentals, and the two-pointer family lead the question data. Start your prep there, then work down the list.
Had your Google interview?Tell us what they asked. Reviewed before it goes in, never with your name.
Google interview guide

Know what Google asks before you walk in.

34 coding · 7 system design · 47 behavioral questions

Get Premium$49 a year · Cancel anytime
Or start freeNo card.

Get their questions first.

InterviewLegend is independent and not affiliated with or endorsed by any company it covers.