Google Coding Interview Questions

The coding round in a Google software engineering loop is a Data Structures and Algorithms interview, but what it actually measures is less about whether you reach the optimal answer and more about how you reason toward it. Here's what the round assesses, how the bar rises from L4 to L6, and how to prepare.

What the round assesses

A Google SWE loop is built around three rounds: Coding (DS & Algorithms), System Design for L5 and above, and a Googleyness & Leadership behavioral round. The coding round is scored primarily on two attributes. The first is General Cognitive Ability, which is about how you structure an ambiguous problem, reason through trade-offs, and communicate a logical path to a solution — not whether you memorized an answer. The second is Role-Related Knowledge, which is the depth and relevance of your coding and systems expertise for the level you're targeting. In practice this means a candidate who talks through their thinking, states assumptions, and tests their own code can score well even on a problem they don't fully finish, while a candidate who silently produces a correct answer may still score below the bar on communication.

How the bar scales from L4 to L6

The format of the coding round is roughly constant across levels; what rises is the bar for the evidence. At L4, the expectation is intermediate: you own features end-to-end, design medium-sized solutions, and make sound trade-offs with light guidance — on the coding round that shows up as clean, correct execution on a well-scoped problem with reasonable complexity analysis. At L5 (Senior), you're expected to drive direction for multi-service or multi-team scope and be proactive about failure modes, metrics, and ambiguity — in the coding round, that means catching edge cases unprompted, discussing trade-offs between approaches, and leading the conversation rather than waiting to be steered. At L6 (Staff), the scope is organizational and the expectation is expert-level: anticipating operational and cost concerns and resolving ambiguity without help. The coding problem itself may look similar, but the depth of reasoning and the breadth of what you consider is what separates the levels.

What a strong answer looks like

A strong coding-round performance starts before any code is written: you restate the problem, clarify the inputs and constraints, and name the brute-force approach along with its complexity before improving on it. You narrate your reasoning as you go so the interviewer can follow the trade-offs you're weighing. You write code that you then actually trace through with a concrete example, catching your own bugs rather than waiting to be told. And you discuss complexity honestly — including where your solution could fail at scale. The strongest signal is a candidate who treats the interviewer as a collaborator, surfacing assumptions and asking which constraints matter most, rather than guessing silently.

Common mistakes

Practice prompts (original, for self-study)

These are original DS & algorithms practice scenarios written for self-study — not real or leaked Google interview questions.

Arrays (L4) — Given a list of daily temperatures, return for each day how many days you'd wait until a warmer day. Walk through brute force first, then improve it, stating complexity at each step.
Hashing (L4) — Design a data structure that supports insert, delete, and get-random-element all in average O(1) time. Explain your approach before coding.
Graphs (L5) — You're given a dependency list for build tasks. Determine a valid build order, or report that none exists. Discuss how you'd detect and explain a cycle.
Intervals (L5) — Merge a stream of meeting intervals arriving out of order and report the minimum number of rooms needed at peak. Narrate the trade-offs of your chosen approach.
Design + scale (L6) — Design the data structure behind an autocomplete feature. Start with correctness, then discuss how it changes when the dictionary is too large to fit in memory.
Optimization (L6) — Given a very large log file you can only stream once, find the top K most frequent entries. Discuss the memory/accuracy trade-offs of your approach.

Frequently asked questions

What does the Google coding round actually test?

It is scored primarily on General Cognitive Ability — how you structure an ambiguous problem and communicate your reasoning — and Role-Related Knowledge, the depth of your coding and systems expertise for the target level. Reaching the optimal answer matters less than how you reason toward it.

How is the bar different at L5 versus L4?

At L4 the bar is clean, correct execution on a well-scoped problem with reasonable complexity analysis. At L5 you're expected to catch edge cases unprompted, weigh trade-offs between approaches, and lead the conversation rather than waiting to be steered.

Do I need to finish the problem to pass?

Not necessarily. A candidate who clearly communicates assumptions, trade-offs, and complexity can score well even without a fully finished solution, while a silent, correct answer may still fall short on the communication the round grades.

What are common mistakes in the Google coding interview?

Common mistakes include jumping straight to code before clarifying the problem, coding in silence so the interviewer can't follow your reasoning, ignoring edge cases, skipping complexity analysis, and not testing your own code to catch bugs before the interviewer does.